-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.qa.template.yml
220 lines (206 loc) · 5.34 KB
/
docker-compose.qa.template.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
version: "3.9"
services:
frontend:
image: ghcr.io/isd-sgcu/firstdate-rpkm67-frontend:latest
container_name: frontend
restart: unless-stopped
networks:
- rpkm67
ports:
- "3000:3000"
gateway:
image: ghcr.io/isd-sgcu/rpkm67-gateway:latest
container_name: gateway
restart: unless-stopped
depends_on: [db, auth, backend, checkin, store]
environment:
APP_PORT: 3001
APP_ENV: development
APP_MAX_FILE_SIZE_MB: 10
APP_SERVICE_NAME: rpkm67-gateway
IMG_MAX_FILE_SIZE_MB: 1
IMG_CROP_WIDTH: 500
IMG_CROP_HEIGHT: 500
REG_RPKM_CONFIRM_START: "2024-07-25T00:00:00Z"
REG_BAAN_RESULT_START: "2024-07-28T20:00:00Z"
REG_RPKM_DAY_ONE_START: "2024-08-03T06:00:00Z"
REG_RPKM_DAY_TWO_START: "2024-08-04T06:00:00Z"
REG_FRESHY_NIGHT_CONFIRM_START: "2024-08-03T08:00:00Z"
REG_FRESHY_NIGHT_CONFIRM_END: "2024-08-04T16:00:00Z"
REG_FRESHY_NIGHT_START: "2024-08-04T16:30:00Z"
REG_RPKM_START: "2024-07-20T20:00:00Z"
REG_RPKM_END: "2024-07-25T00:00:00Z"
SERVICE_AUTH: auth:3002
SERVICE_BACKEND: backend:3003
SERVICE_CHECKIN: checkin:3004
SERVICE_STORE: store:3005
CORS_ORIGINS: http://localhost:3000
DB_URL: postgres://root:1234@db:5432/rpkm67_db
TRACER_ENDPOINT: otel-collector:4318
networks:
- rpkm67
ports:
- "3001:3001"
auth:
image: ghcr.io/isd-sgcu/rpkm67-auth:latest
container_name: auth
restart: unless-stopped
depends_on:
- db
environment:
APP_PORT: 3002
APP_ENV: development
DB_URL: postgres://root:1234@db:5432/rpkm67_db
REDIS_HOST: cache
REDIS_PORT: 6379
REDIS_PASSWORD: 5678
JWT_SECRET: secret
JWT_ACCESS_TTL: 3600
JWT_REFRESH_TTL: 259200
JWT_ISSUER: rpkm67.sgcu.in.th
AUTH_CHECK_CHULA_EMAIL: false
OAUTH_CLIENT_ID: client_id
OAUTH_CLIENT_SECRET: client_secret
OAUTH_REDIRECT_URI: http://localhost:3000
networks:
- rpkm67
volumes:
- ./microservices/auth:/app/config/staffs
ports:
- "3002:3002"
backend:
image: ghcr.io/isd-sgcu/rpkm67-backend:latest
container_name: backend
restart: unless-stopped
depends_on:
- db
environment:
APP_PORT: 3003
APP_ENV: development
DB_URL: postgres://root:1234@db:5432/rpkm67_db
REDIS_HOST: cache
REDIS_PORT: 6379
REDIS_PASSWORD: 5678
GROUP_CAPACITY: 2
GROUP_CACHE_TTL: 3600
SELECTION_CACHE_TTL: 300
PIN_WORKSHOP_CODE: workshop
PIN_WORKSHOP_COUNT: 5
PIN_LANDMARK_CODE: landmark
PIN_LANDMARK_COUNT: 4
networks:
- rpkm67
ports:
- "3003:3003"
checkin:
image: ghcr.io/isd-sgcu/rpkm67-checkin:latest
container_name: checkin
restart: unless-stopped
depends_on:
- db
environment:
APP_PORT: 3004
APP_ENV: development
APP_SERVICE_NAME: checkin
DB_URL: postgres://root:1234@db:5432/rpkm67_db
TRACER_ENDPOINT: otel-collector:4317
networks:
- rpkm67
ports:
- "3004:3004"
store:
image: ghcr.io/isd-sgcu/rpkm67-store:latest
container_name: store
restart: unless-stopped
environment:
APP_PORT: 3005
APP_ENV: development
STORE_ENDPOINT: endpoint
STORE_ACCESS_KEY: access_key
STORE_SECRET_KEY: secret_key
STORE_REGION: ap-southeast-1
STORE_USE_SSL: true
STORE_BUCKET_NAME: rpkm67-local
networks:
- rpkm67
ports:
- "3005:3005"
db:
image: postgres:15.1-alpine3.17
container_name: db
restart: unless-stopped
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: "1234"
POSTGRES_DB: rpkm67_db
networks:
- rpkm67
volumes:
- postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
cache:
image: redis:7.2.3-alpine
container_name: cache
restart: unless-stopped
environment:
REDIS_HOST: localhost
REDIS_PASSWORD: "5678"
networks:
- rpkm67
ports:
- "6379:6379"
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
networks:
- rpkm67
volumes:
- ./microservices/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_PASSWORD=1234
networks:
- rpkm67
volumes:
- grafana:/var/lib/grafana
ports:
- "3006:3000"
otel-collector:
image: otel/opentelemetry-collector-contrib:0.104.0
container_name: otel-collector
restart: unless-stopped
depends_on:
- jaeger
command: ["--config=/etc/opentelemetry.yml"]
networks:
- rpkm67
volumes:
- ./microservices/opentelemetry/opentelemetry.yml:/etc/opentelemetry.yml
ports:
- 4317:4317 # OTLP gRPC receiver
- 4318:4318 # OTLP HTTP receiver
jaeger:
image: jaegertracing/all-in-one:1.58
container_name: jaeger
restart: unless-stopped
environment:
- COLLECTOR_OTLP_ENABLED=true
networks:
- rpkm67
ports:
- 9091:16686 # Jaeger UI
- 14250:14250 # Jaeger gRPC collector
- 14268:14268 # Jaeger HTTP collector
networks:
rpkm67:
name: rpkm67
volumes:
postgres:
grafana: