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
version: '3' | |
services: | |
app: | |
build: | |
context: . | |
dockerfile: Dockerfile | |
args: | |
VARIANT: "2.7" | |
NODE_VERSION: "lts/*" | |
volumes: | |
# Update this to wherever you want VS Code to mount the folder of your project | |
- ..:/workspace:cached | |
# Overrides default command so things don't shut down after the process ends. | |
command: sleep infinity | |
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. | |
network_mode: service:db | |
db: | |
image: postgres:latest | |
restart: unless-stopped | |
volumes: | |
- postgres-data:/var/lib/postgresql/data | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
POSTGRES_PASSWORD: postgres | |
volumes: | |
postgres-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment