forked from cptn-io/el-cptn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
130 lines (123 loc) · 2.99 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
version: "3.8"
services:
db:
image: postgres:14.7-alpine3.17
restart: unless-stopped
volumes:
- postgres:/var/lib/postgresql/data
expose:
- 5432
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:6.2-alpine
restart: unless-stopped
volumes:
- redis:/data
expose:
- 6379
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 5s
retries: 5
app-ux:
image: ghcr.io/cptn-io/app-ux:latest
restart: unless-stopped
ports:
- 80:80
- 443:443
environment:
- APP_URL=${APP_URL}
mgmt-svc:
image: ghcr.io/cptn-io/mgmt-svc:latest
deploy:
replicas: 1
expose:
- 8080
volumes:
- ./logs:/logs
environment:
- SPRING_PROFILES_ACTIVE=prod
- DB_URL=jdbc:postgresql://db:5432/${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- CPTN_CRYPTO_SECRET=${CPTN_CRYPTO_SECRET}
- JWT_SECRET=${JWT_SECRET}
- SETUP_DEFAULT_PASSWORD=${SETUP_DEFAULT_PASSWORD}
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "wget -qO- http://localhost:8080/actuator/health | grep -q 'UP'" ]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
ingestion-svc:
image: ghcr.io/cptn-io/ingestion-svc:latest
deploy:
replicas: 1
volumes:
- ./logs:/logs
expose:
- 8081
environment:
- SPRING_PROFILES_ACTIVE=prod
- DB_URL=jdbc:postgresql://db:5432/${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- CPTN_CRYPTO_SECRET=${CPTN_CRYPTO_SECRET}
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "wget -qO- http://localhost:8081/actuator/health | grep -q 'UP'" ]
interval: 30s
timeout: 10s
retries: 5
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
mgmt-svc:
condition: service_healthy
processor:
image: ghcr.io/cptn-io/processor:latest
deploy:
replicas: 1
volumes:
- ./logs:/app/logs
environment:
- NODE_ENV=production
- PGHOST=db
- PGPORT=5432
- PGDATABASE=${DB_NAME}
- PGUSER=${DB_USER}
- PGPASSWORD=${DB_PASSWORD}
- PGSSLMODE=disable
- CPTN_CRYPTO_SECRET=${CPTN_CRYPTO_SECRET}
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "ps -ef | grep 'node launcher.js' | grep -v grep > /dev/null || exit 1" ]
interval: 10s
timeout: 15s
retries: 5
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
mgmt-svc:
condition: service_healthy
volumes:
postgres:
redis: