diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..d83e5af --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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 + } + } +} diff --git a/.devcontainer/docker-compose.dev.yml b/.devcontainer/docker-compose.dev.yml new file mode 100644 index 0000000..fbbc963 --- /dev/null +++ b/.devcontainer/docker-compose.dev.yml @@ -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: {} diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..479b17e --- /dev/null +++ b/.dockerignore @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..237d9d2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM node:16 + +WORKDIR /app + +COPY . /app +RUN yarn install diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3fde921 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3' + +services: + web: + build: + context: . + dockerfile: Dockerfile + volumes: + - .:/app:cached + - /app/node_modules + ports: + - '8080:8080'