|
| 1 | +// For format details, see https://aka.ms/devcontainer.json. For config options, see the |
| 2 | +// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose |
| 3 | +{ |
| 4 | + "name": "full-stack-fastapi-template devcontainer", |
| 5 | + |
| 6 | + // Update the 'dockerComposeFile' list if you have more compose files or use different names. |
| 7 | + // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make. |
| 8 | + "dockerComposeFile": [ |
| 9 | + "../docker-compose.yml", |
| 10 | + "../docker-compose.override.yml", |
| 11 | + "docker-compose.yml" |
| 12 | + ], |
| 13 | + |
| 14 | + // The 'service' property is the name of the service for the container that VS Code should |
| 15 | + // use. Update this value and .devcontainer/docker-compose.yml to the real service name. |
| 16 | + "service": "backend", |
| 17 | + |
| 18 | + // The optional 'workspaceFolder' property is the path VS Code should open by default when |
| 19 | + // connected. This is typically a file mount in .devcontainer/docker-compose.yml |
| 20 | + "workspaceFolder": "/workspaces", |
| 21 | + |
| 22 | + // Features to add to the dev container. More info: https://containers.dev/features. |
| 23 | + "features": { |
| 24 | + "ghcr.io/devcontainers/features/common-utils:2":{ |
| 25 | + "installZsh": "true", |
| 26 | + "installOhMyZsh": "true", |
| 27 | + "upgradePackages": "true" |
| 28 | + }, |
| 29 | + // node |
| 30 | + // host both backend and frontend in the same container |
| 31 | + "ghcr.io/devcontainers/features/node:1": { |
| 32 | + "version": "24" |
| 33 | + } |
| 34 | + }, |
| 35 | + |
| 36 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 37 | + // "forwardPorts": [], |
| 38 | + |
| 39 | + // Uncomment the next line if you want start specific services in your Docker Compose config. |
| 40 | + "runServices": ["db", "prestart", "backend"], |
| 41 | + |
| 42 | + // Uncomment the next line if you want to keep your containers running after VS Code shuts down. |
| 43 | + // "shutdownAction": "none", |
| 44 | + |
| 45 | + // Uncomment the next line to run commands after the container is created. |
| 46 | + // "postCreateCommand": "cat /etc/os-release", |
| 47 | + |
| 48 | + // Configure tool-specific properties. |
| 49 | + // "customizations": {}, |
| 50 | + |
| 51 | + // Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. |
| 52 | + // "remoteUser": "devcontainer" |
| 53 | + |
| 54 | + "remoteEnv": { |
| 55 | + "VITE_API_URL": "http://localhost:8000" |
| 56 | + } |
| 57 | +} |
0 commit comments