Skip to content

Instantly share code, notes, and snippets.

@PranjalAgni
Created January 23, 2021 17:30
Show Gist options
  • Select an option

  • Save PranjalAgni/3503e94c571fc3491058ac0c928a9689 to your computer and use it in GitHub Desktop.

Select an option

Save PranjalAgni/3503e94c571fc3491058ac0c928a9689 to your computer and use it in GitHub Desktop.
Basic docker-compose config for nodejs + postgres
version: "3.7"
services:
postgres:
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- '5432:5432'
volumes:
- sula-db:/var/lib/postgresql/data
your-service:
build:
context: .
environment:
DB_SCHEMA: postgres
DB_USER: postgres
DB_PASSWORD: postgres
DB_HOST: postgres
depends_on:
- postgres
ports:
- '1234:1234'
volumes:
sula-db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment