-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·84 lines (78 loc) · 1.88 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '3.1'
services:
dashboard:
build:
context: dashboard
dockerfile: Dockerfile
command: ["./autostart.sh"]
env_file:
- ./dashboard/.env.Docker
restart: always
ports:
- "127.0.0.1:3000:3000"
volumes:
- dashboard-volume:/usr/src/carbon-api-dashboard/dashboard
depends_on:
- api
- db_dashboard
cron:
build:
context: dashboard
dockerfile: cron.Dockerfile
command: ["./startcron.sh"]
env_file:
- ./dashboard/.env.Docker
volumes:
- dashboard-volume:/usr/src/carbon-api-dashboard/dashboard
depends_on:
- dashboard
- api
- db_dashboard
db_dashboard:
image: postgres
env_file:
- ./dashboard/.env.Docker
restart: always
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: ["CMD", "pg_isready", '-U', 'postgres']
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./init-postgres-user.sh:/docker-entrypoint-initdb.d/01-init-postgres-user.sh
- ./dashboard/dump.sql:/docker-entrypoint-initdb.d/02-dump.sql
- db-dashboard-volume:/var/lib/postgresql/data
api:
build:
context: api
dockerfile: Dockerfile
command: ["./autostart.sh"]
env_file:
- ./api/.env.Docker
restart: always
ports:
- "127.0.0.1:3001:3000"
depends_on:
- db_api
db_api:
image: postgres
env_file:
- ./api/.env.Docker
restart: always
ports:
- "127.0.0.1:5433:5432"
healthcheck:
test: ["CMD", "pg_isready", '-U', 'postgres']
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./init-postgres-user.sh:/docker-entrypoint-initdb.d/01-init-postgres-user.sh
- ./api/dump.sql:/docker-entrypoint-initdb.d/02-dump.sql
- db-api-volume:/var/lib/postgresql/data
volumes:
dashboard-volume:
db-dashboard-volume:
db-api-volume: