-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (47 loc) · 1.14 KB
/
docker-compose.yml
File metadata and controls
51 lines (47 loc) · 1.14 KB
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
version: '3.9'
services:
postgres:
image: postgres:16-alpine
container_name: payments-postgres
environment:
POSTGRES_DB: payments
POSTGRES_USER: payments
POSTGRES_PASSWORD: secret
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U payments"]
interval: 5s
timeout: 5s
retries: 5
app:
build: .
container_name: payments-app
depends_on:
postgres:
condition: service_healthy
environment:
DB_URL: jdbc:postgresql://postgres:5432/payments
DB_USER: payments
DB_PASSWORD: secret
JWT_SECRET: cGF5bWVudC1zeXN0ZW0tc2VjcmV0LWtleS10aGF0LWlzLWF0LWxlYXN0LTI1Ni1iaXRz
GRAPHIQL_ENABLED: "true"
JAVA_OPTS: >-
-Xms256m
-Xmx512m
-XX:+UseG1GC
-XX:MaxGCPauseMillis=200
ports:
- "8080:8080"
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: payments-prometheus
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
volumes:
pgdata: