Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: "2"
- services:
- practice_docker:
- image: cryt1c/practice_docker
- ports:
- - 80:3000
- command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; npm start'
- depends_on:
- - db
- environment:
- - DATABASE_URL=postgres://postgres:password@db:5432/practicedocker
- - PORT=3000
- db:
- image: postgres
- environment:
- - POSTGRES_USER=postgres
- - POSTGRES_PASSWORD=password
- - POSTGRES_DB=practicedocker
Add Comment
Please, Sign In to add comment