Last active
July 23, 2024 14:17
-
-
Save luutuankiet/23a7c5bdf896896f8b9d1fa1b95ddb08 to your computer and use it in GitHub Desktop.
devcontainer boilerplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | |
// README at: https://github.com/devcontainers/templates/tree/main/src/python | |
{ | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ================================================= DEFAULTS ====================================== | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
"name": "Python 3", | |
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bookworm", | |
"postCreateCommand": "bash -i .devcontainer/postCreateCommand.sh", | |
"remoteUser": "root", | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ================================================= FEATURE : DOCKER IN DOCKER & NPM ====================================== | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
"features": { | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ================================================= DEFAULT FEATURE : NPM ====================================== | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
"ghcr.io/devcontainers/features/node:1": { | |
"nodeGypDependencies": true, | |
"installYarnUsingApt": true, | |
"version": "lts", | |
"nvmVersion": "latest" | |
}, | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ================================================= FEATURE : DOCKER IN DOCKER ====================================== | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
"ghcr.io/devcontainers/features/docker-in-docker:2": { | |
"moby": "false", | |
"azureDnsAutoDetection": "false", | |
"installDockerBuildx": "false", | |
"installDockerComposeSwitch": "false", | |
"version": "latest", | |
"dockerDashComposeVersion": "latest" | |
}, | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ================================================= FEATURE :SSH server ====================================== | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
"ghcr.io/devcontainers/features/sshd:1": { | |
"version": "latest" | |
} | |
}, | |
"customizations": { | |
"vscode": { | |
"extensions": [ | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ================================================= VS CODE EXTENSIONS SETTINGS ====================================== | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// defaults | |
"mechatroner.rainbow-csv", | |
"chrisdias.vscode-opennewinstance", | |
"mhutchie.git-graph", | |
"ms-python.debugpy", | |
"ms-python.python", | |
"ms-python.vscode-pylance", | |
"ms-toolsai.jupyter", | |
"ms-toolsai.jupyter-keymap", | |
"ms-toolsai.jupyter-renderers", | |
"ms-toolsai.vscode-jupyter-cell-tags", | |
"ms-toolsai.vscode-jupyter-slideshow", | |
"mutantdino.resourcemonitor", | |
"sourcegraph.cody-ai", | |
"uloco.theme-bluloco-dark", | |
"visualstudioexptteam.intellicode-api-usage-examples", | |
"visualstudioexptteam.vscodeintellicode", | |
"ms-azuretools.vscode-docker", | |
"cweijan.vscode-office", | |
"dvirtz.parquet-viewer", | |
"GitHub.vscode-pull-request-github", | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ================================================= EXTENSIONS - DB CONNECTIONS ====================================== | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
"mtxr.sqltools", | |
"mtxr.sqltools-driver-pg", | |
"mtxr.sqltools-driver-sqlite", | |
"randomfractalsinc.duckdb-sql-tools", | |
"taoklerks.poor-mans-t-sql-formatter-vscode", | |
"shakram02.bash-beautify", | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ================================================= EXTENSIONS - DBT ====================================== | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
"bastienboutonnet.vscode-dbt", | |
"henriblancke.vscode-dbt-formatter", | |
"innoverio.vscode-dbt-power-user", | |
"samuelcolvin.jinjahtml", | |
"redhat.vscode-yaml" | |
], | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ================================================= SETTINGS - DEFAULTS ====================================== | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
"settings": { | |
"terminal.integrated.env.osx": { | |
"PYTHONPATH": "${env:PYTHONPATH}" | |
}, | |
"terminal.integrated.env.linux": { | |
"PYTHONPATH": "${env:PYTHONPATH}" | |
}, | |
"terminal.integrated.env.windows": { | |
"PYTHONPATH": "${env:PYTHONPATH}" | |
}, | |
"python.defaultInterpreterPath": ".venv/bin/python", | |
"python.venvFolders": [ | |
"${workspaceFolder}/.venv" | |
], | |
"python.envFile": "${workspaceFolder}/.env", | |
"python.terminal.activateEnvironment": true, | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ================================================= SETTINGS - DBT ====================================== | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
// ======================================================================================================================= | |
"findrelated.workspaceRulesets": [ | |
{ | |
"name": "sql", | |
"rules": [ | |
{ | |
"pattern": "^(.*/)?models/(.*/)?(.+\\.sql)$", | |
"locators": [ | |
"**/compiled/**/$3" | |
] | |
}, | |
{ | |
"pattern": "^(.*/)?compiled/(.*/)?(.+\\.sql)$", | |
"locators": [ | |
"**/run/**/$3" | |
] | |
}, | |
{ | |
"pattern": "^(.*/)?run/(.*/)?(.+\\.sql)$", | |
"locators": [ | |
"**/models/**/$3" | |
] | |
} | |
] | |
} | |
], | |
"findrelated.applyRulesets": [ | |
"sql" | |
], | |
"findrelated.applyWorkspaceRulesets": [ | |
"sql" | |
], | |
"workbench.editor.highlightModifiedTabs": true, | |
"workbench.editor.labelFormat": "medium", | |
"workbench.editor.revealIfOpen": true, | |
"editor.rulers": [ | |
99 | |
], | |
"yaml.schemas": { | |
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/latest/dbt_yml_files-latest.json": [ | |
"/**/*.yml", | |
"!profiles.yml", | |
"!dbt_project.yml", | |
"!packages.yml", | |
"!selectors.yml", | |
"!profile_template.yml" | |
], | |
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/latest/dbt_project-latest.json": [ | |
"dbt_project.yml" | |
], | |
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/latest/selectors-latest.json": [ | |
"selectors.yml" | |
], | |
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/latest/packages-latest.json": [ | |
"packages.yml" | |
] | |
} | |
} | |
} | |
} | |
// "runArgs": ["--name", "scrape-ticktick"], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment