Skip to content

Instantly share code, notes, and snippets.

@ignaciojonas
Created February 26, 2021 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ignaciojonas/9f66a7f8dad701ebd10fc34af936445b to your computer and use it in GitHub Desktop.
Save ignaciojonas/9f66a7f8dad701ebd10fc34af936445b to your computer and use it in GitHub Desktop.
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