mirror of
https://github.com/kodxana/madiator-docker-runpod.git
synced 2024-11-29 21:50:11 +01:00
80 lines
No EOL
2.5 KiB
JSON
80 lines
No EOL
2.5 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"type": "docker-build",
|
|
"label": "docker-build",
|
|
"platform": "python",
|
|
"dockerBuild": {
|
|
"tag": "madiator2011/better-launcher:dev",
|
|
"dockerfile": "${workspaceFolder}/Dockerfile",
|
|
"context": "${workspaceFolder}",
|
|
"pull": true
|
|
}
|
|
},
|
|
{
|
|
"type": "docker-run",
|
|
"label": "docker-run: debug",
|
|
"dependsOn": [
|
|
"docker-build"
|
|
],
|
|
"dockerRun": {
|
|
"containerName": "madiator2011-better-launcher", // no "/" allowed here for container name
|
|
"image": "madiator2011/better-launcher:dev",
|
|
"envFiles": ["${workspaceFolder}/.env"], // pass additional env-vars (hf_token, civitai token, ssh public-key) from ".env" file to container
|
|
"env": { // this ENV vars go into the docker container to support local debugging
|
|
"LOCAL_DEBUG": "True", // change app to localhost Urls and local Websockets (unsecured)
|
|
// if you NOT want need this behaviour, then set `LOCAL_DEBUG=False` [default],
|
|
// which is the same as NOT setting this ENV var at all.
|
|
|
|
"FLASK_APP": "app/app.py",
|
|
|
|
"FLASK_ENV": "development", // changed from "production" [default],
|
|
// only needed when "LOCAL_DEBUG=True", otherwise this ENV var can be obmitted
|
|
|
|
"GEVENT_SUPPORT": "True" // gevent monkey-patching is being used, enable gevent support in the debugger,
|
|
// only needed when "LOCAL_DEBUG=True", otherwise this ENV var can be obmitted
|
|
|
|
// "FLASK_DEBUG": "0" // "1" allows debugging in Chrome, but then VSCode debugger not works, "0" is the [default], which is the same as NOT setting this ENV var at all
|
|
},
|
|
"volumes": [
|
|
{
|
|
"containerPath": "/app",
|
|
"localPath": "${workspaceFolder}" // the "/app" folder (and sub-folders) will be mapped locally for debugging and hot-reload
|
|
},
|
|
{
|
|
"containerPath": "/workspace",
|
|
// TODO: create the below folder before you run!
|
|
"localPath": "${userHome}/Projects/Docker/Madiator/workspace"
|
|
}
|
|
],
|
|
"ports": [
|
|
{
|
|
"containerPort": 7222, // main Flask app port "App-Manager"
|
|
"hostPort": 7222
|
|
},
|
|
{
|
|
"containerPort": 8181, // File-Browser
|
|
"hostPort": 8181
|
|
},
|
|
{
|
|
"containerPort": 7777, // VSCode-Server
|
|
"hostPort": 7777
|
|
}
|
|
]
|
|
},
|
|
"python": {
|
|
"args": [
|
|
"run",
|
|
// "--no-debugger", // disabled to support VSCode debugger
|
|
// "--no-reload", // disabled to support hot-reload
|
|
"--host",
|
|
"0.0.0.0",
|
|
"--port",
|
|
"7222"
|
|
],
|
|
"module": "flask"
|
|
}
|
|
}
|
|
]
|
|
} |