|
| 1 | +// Update the VARIANT arg in docker-compose.yml to pick a Python version: 3, 3.8, 3.7, 3.6 |
| 2 | +{ |
| 3 | + "name": "Packet Codespace (python and postgres)", |
| 4 | + "dockerComposeFile": "docker-compose.yaml", |
| 5 | + "service": "app", |
| 6 | + |
| 7 | + // Set *default* container specific settings.json values on container create. |
| 8 | + "settings": { |
| 9 | + "sqltools.connections": [{ |
| 10 | + "name": "Container database", |
| 11 | + "driver": "PostgreSQL", |
| 12 | + "previewLimit": 50, |
| 13 | + "server": "localhost", |
| 14 | + "port": 5432, |
| 15 | + "database": "postgres", |
| 16 | + "username": "postgres", |
| 17 | + "password": "mysecretpassword" |
| 18 | + }], |
| 19 | + "terminal.integrated.shell.linux": "/bin/bash", |
| 20 | + "python.pythonPath": "/opt/python/latest/bin/python", |
| 21 | + "python.linting.enabled": true, |
| 22 | + "python.linting.pylintEnabled": true, |
| 23 | + "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", |
| 24 | + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", |
| 25 | + "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", |
| 26 | + "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", |
| 27 | + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", |
| 28 | + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", |
| 29 | + "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", |
| 30 | + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", |
| 31 | + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", |
| 32 | + "python.testing.pytestPath": "/usr/local/py-utils/bin/pytest" |
| 33 | + }, |
| 34 | + "remoteUser": "codespace", |
| 35 | + "overrideCommand": false, |
| 36 | + "workspaceMount": "source=${localWorkspaceFolder},target=/home/codespace/workspace,type=bind,consistency=cached", |
| 37 | + "workspaceFolder": "/home/codespace/workspace", |
| 38 | + "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined", "--privileged", "--init" ], |
| 39 | + |
| 40 | + // Add the IDs of extensions you want installed when the container is created. |
| 41 | + "extensions": [ |
| 42 | + "GitHub.vscode-pull-request-github", |
| 43 | + "ms-python.python", |
| 44 | + "mtxr.sqltools", |
| 45 | + "mtxr.sqltools-driver-pg" |
| 46 | + ], |
| 47 | + |
| 48 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 49 | + // "forwardPorts": [5000, 5432], |
| 50 | + |
| 51 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 52 | + // "oryx build" will automatically install your dependencies and attempt to build your project |
| 53 | + "postCreateCommand": [ |
| 54 | + "pip install --progress-bar=off install -r requirements.txt;", |
| 55 | + "yarn install && `yarn bin gulp production`;", |
| 56 | + "/home/codespace/.local/bin/flask db upgrade;" |
| 57 | + ] |
| 58 | +} |
0 commit comments