Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of using docker-compose.
version: '3'
services:
postgres:
image: postgres:12.1
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: mypassword
volumes:
- ./postgresql/data:/var/lib/postgresql/data
service:
build:
context: ./service
dockerfile: Dockerfile
volumes:
- /app/node_modules
- ./service/config:/app/config
- ./service/src:/app/src
- ./service/test:/app/test
ports:
- "3000:3000"
ui:
build:
context: ./ui
dockerfile: Dockerfile.dev
volumes:
- /app/node_modules
- ./ui:/app
ports:
- "8080:8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment