···11+version: '3.7'
22+services:
33+ # Update this to the name of the service you want to work with in your docker-compose.yml file
44+ app:
55+ # Uncomment if you want to override the service's Dockerfile to one in the .devcontainer
66+ # folder. Note that the path of the Dockerfile and context is relative to the *primary*
77+ # docker-compose.yml file (the first in the devcontainer.json "dockerComposeFile"
88+ # array). The sample below assumes your primary file is in the root of your project.
99+ #
1010+ # build:
1111+ # context: .
1212+ # dockerfile: .devcontainer/Dockerfile
1313+1414+ image: mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm
1515+1616+ volumes:
1717+ # Update this to wherever you want VS Code to mount the folder of your project
1818+ - ..:/workspaces:cached
1919+ command: sleep infinity
2020+2121+ valkey:
2222+ image: valkey/valkey
2323+ env_file:
2424+ - path: ./.env
2525+ required: false
+7-1
.devcontainer/devcontainer.json
···33{
44 "name": "Node.js",
55 // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
66- "image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm",
66+ "dockerComposeFile": [
77+ "compose.yml"
88+ ],
99+1010+ "service": "app",
1111+1212+ "workspaceFolder": "/workspaces",
713814 // Features to add to the dev container. More info: https://containers.dev/features.
915 // "features": {},