-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose-run.yaml
89 lines (82 loc) · 1.87 KB
/
docker-compose-run.yaml
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
85
86
87
88
89
version: "3.9"
# Use this spec to run all of the code in separate services.
services:
# Instance used for dev application instance.
postgres:
image: postgres:16-alpine
shm_size: 4g
cpu_count: 4
user: root
volumes:
- ./.pgdata/database:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=momo
- PGDATA=/var/lib/postgresql/data/db-files/
expose:
- 5432
ports:
- "5432:5432"
networks:
- momo
# The main API instance set to enable default routes and reporting
api:
image: momo/api
build:
context: ./
dockerfile: ./Dockerfile.core
environment:
- ENABLE_DEFAULT_ROUTES=true # Load default routes
- ENABLE_REPORTING_ROUTES=true # Load reporting routes
- EXPOSE_SWAGGER_UI=true # Just for local demo
expose:
- 8080
ports:
- "8080:8080"
depends_on:
- postgres
networks:
- momo
# The admin API instance with only admin routes
admin:
image: momo/api
build:
context: ./
dockerfile: ./Dockerfile.core
environment:
- ENABLE_ADMIN_ROUTES=true # Only load admin routes
- SKIP_DB_RESET=true # Here, we don't reset the DB; we do it in the other instance.
- EXPOSE_SWAGGER_UI=true # Just for local demo
expose:
- 8081
ports:
- "8081:8080"
depends_on:
- postgres
networks:
- momo
svc1:
image: momo/svc1
build:
context: ./
dockerfile: ./Dockerfile.svc
environment:
- SVC_ROLE=WorkItemStatusMonitorService
depends_on:
- api
networks:
- momo
svc2:
image: momo/svc2
build:
context: ./
dockerfile: ./Dockerfile.svc
environment:
- SVC_ROLE=WorkItemMonitorService
depends_on:
- api
networks:
- momo
networks:
momo: