Skip to content

Instantly share code, notes, and snippets.

@Solijons
Last active October 26, 2021 19:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Solijons/d6158f40c47d864f14b95b61904af14c to your computer and use it in GitHub Desktop.
Save Solijons/d6158f40c47d864f14b95b61904af14c to your computer and use it in GitHub Desktop.
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