Adding dev container and updating configs (#95)
* Adding dec container and updating configs * Update .devcontainer/devcontainer.json
This commit is contained in:
Родитель
e792293c74
Коммит
0e4d14ec63
|
@ -0,0 +1,32 @@
|
|||
// 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
|
||||
{
|
||||
"name": "Python VS Code Flask Tutorial",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
"postCreateCommand": "pip3 install --user -r requirements.txt",
|
||||
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python",
|
||||
"ms-python.black-formatter",
|
||||
"ms-python.vscode-pylance",
|
||||
"charliermarsh.ruff",
|
||||
"ms-python.debugpy"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for more information:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
# https://containers.dev/guide/dependabot
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "devcontainers"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
|
@ -5,121 +5,21 @@
|
|||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Python: runserver.py",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/runserver.py",
|
||||
},
|
||||
{
|
||||
"name": "Python: Current File",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"env": {
|
||||
"FLASK_ENV": "development"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Python: Attach",
|
||||
"type": "python",
|
||||
"request": "attach",
|
||||
"localRoot": "${workspaceFolder}",
|
||||
"remoteRoot": "${workspaceFolder}",
|
||||
"port": 3000,
|
||||
"secret": "my_secret",
|
||||
"host": "localhost"
|
||||
},
|
||||
{
|
||||
"name": "Python: Terminal (integrated)",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"console": "integratedTerminal"
|
||||
},
|
||||
{
|
||||
"name": "Python: Terminal (external)",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"console": "externalTerminal"
|
||||
},
|
||||
{
|
||||
"name": "Python: Django",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/manage.py",
|
||||
"args": [
|
||||
"runserver",
|
||||
"--noreload",
|
||||
"--nothreading"
|
||||
],
|
||||
"debugOptions": [
|
||||
"RedirectOutput",
|
||||
"Django"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Python: Flask (0.11.x or later)",
|
||||
"type": "python",
|
||||
"name": "Python Debugger: Flask",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "flask",
|
||||
"env": {
|
||||
"FLASK_APP": "hello_app.webapp"
|
||||
"FLASK_APP": "hello_app.webapp",
|
||||
"FLASK_DEBUG": "1"
|
||||
},
|
||||
"args": [
|
||||
"run",
|
||||
"--no-debugger",
|
||||
"--no-reload" // Remove to auto-reload modified pages
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Python: Module",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"module": "module.name"
|
||||
},
|
||||
{
|
||||
"name": "Python: Pyramid",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${workspaceFolder}/development.ini"
|
||||
"--no-reload"
|
||||
],
|
||||
"debugOptions": [
|
||||
"RedirectOutput",
|
||||
"Pyramid"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Python: Watson",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/console.py",
|
||||
"args": [
|
||||
"dev",
|
||||
"runserver",
|
||||
"--noreload=True"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Python: All debug Options",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"pythonPath": "${config:python.pythonPath}",
|
||||
"program": "${file}",
|
||||
"module": "module.name",
|
||||
"env": {
|
||||
"VAR1": "1",
|
||||
"VAR2": "2"
|
||||
},
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
"args": [
|
||||
"arg1",
|
||||
"arg2"
|
||||
],
|
||||
"debugOptions": [
|
||||
"RedirectOutput"
|
||||
]
|
||||
"jinja": true,
|
||||
"justMyCode": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче