Configure container development

This commit is contained in:
Ed Rivas 2023-01-09 23:11:11 +00:00
parent b205803bf7
commit 1433075dd2
5 changed files with 179 additions and 0 deletions

View File

@ -0,0 +1,81 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "sass-site",
"dockerComposeFile": ["../docker-compose.yml", "./docker-compose.dev.yml"],
"service": "web",
"workspaceFolder": "/app",
"shutdownAction": "stopCompose",
"extensions": [
"csstools.postcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"formulahendry.auto-rename-tag",
"naumovs.color-highlight",
"stkb.rewrap",
"stylelint.vscode-stylelint",
"syler.sass-indented",
"tyriar.sort-lines",
"xabikos.javascriptsnippets"
],
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"terminal.integrated.defaultProfile.linux": "bash",
"editor.bracketPairColorization.enabled": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"eslint.validate": ["javascript", "typescript"],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"javascript.suggestionActions.enabled": false,
"typescript.preferences.quoteStyle": "single",
"typescript.tsdk": "node_modules/typescript/lib",
"[javascript]": {
"editor.rulers": [80]
},
"[markdown]": {
"editor.rulers": [80]
},
"[typescript]": {
"editor.rulers": [80]
},
"[html]": {
"editor.formatOnSave": false
},
"[scss]": {
"editor.rulers": [80],
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
},
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
".coverage": true,
"coverage": true,
"htmlcov": true,
".tags": true,
".cache": true,
".vscode": true,
"collected-assets": true,
"staticfiles": true,
"**/*.egg-info": true
},
"search.exclude": {
"**/node_modules": true,
"**/*.css.map": true,
"**/*.js.map": true,
"yarn.lock": true,
"yarn-debug.log": true,
"yarn-error.log": true
}
}
}

View File

@ -0,0 +1,13 @@
version: '3'
services:
web:
volumes:
- .:/app:delegated
- vscode-server:/root/.vscode-server:cached
- /var/run/docker.sock:/var/run/docker.sock:cached
# Override command to prevent container crashing if webpack build exits
command: sleep infinity
volumes:
vscode-server: {}

67
.dockerignore Normal file
View File

@ -0,0 +1,67 @@
**/*.DS_Store
**/*.cover
**/*.crt
**/*.css.map
**/*.dump
**/*.js.map
**/*.key
**/*.log
**/*.manifest
**/*.md
**/*.mo
**/*.orig
**/*.pot
**/*.rst
**/*.spec
**/*.sql
**/*.swo
**/*.swp
**/*~
**/Dockerfile
.cache
.coverage
.coverage.*
.devcontainer/
.dockerignore
.git
.github/
.hypothesis/
.idea/
.installed.cfg
.livereload
.nvmrc
.nyc_output/
.ropeproject
.vscode/
.yarnrc
ENV/
build/
celerybeat-schedule
coverage.xml
coverage/
derrick
dist/
docker-compose.yml
docs/_build/
downloads/
dump.rdb
env.example
env/
heroku.yml
htmlcov/
lib64/
node_modules/
nosetests.xml
npm-debug.log
parts/
pip-delete-this-directory.txt
pip-log.txt
postgres/
sdist/
staticfiles/
var/
venv/
wheels/
yarn-error.log
!STYLEGUIDE.rst

6
Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM node:16
WORKDIR /app
COPY . /app
RUN yarn install

12
docker-compose.yml Normal file
View File

@ -0,0 +1,12 @@
version: '3'
services:
web:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/app:cached
- /app/node_modules
ports:
- '8080:8080'