-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
66 lines (61 loc) · 1.17 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: "3.7"
services:
db:
image: postgres:latest
volumes:
- ./volumes:/var/lib/postgresql/data/
ports:
- "5433:5432"
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
- POSTGRES_DB=sso
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
profiles: ["dev", "prod"]
backend:
build:
context: .
dockerfile: docker/backend.Dockerfile
ports:
- "8001:8001"
links:
- db:db
environment:
- DATABASE_HOST=db
depends_on:
- db
volumes:
- ".:/app"
- "/app/cli"
profiles: ["dev", "prod"]
networks:
- default
- sso
frontend-dev:
build:
context: frontend
dockerfile: Dockerfile
command: npm start
volumes:
- "./frontend:/app"
- "/app/node_modules"
ports:
- "3001:3000"
environment:
- CHOKIDAR_USEPOLLING=true
profiles: ["dev"]
frontend-prod:
build:
context: frontend
dockerfile: prod.Dockerfile
ports:
- "3001:3001"
profiles: ["prod"]
networks:
sso:
driver: bridge