-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
79 lines (74 loc) · 1.93 KB
/
compose.yaml
File metadata and controls
79 lines (74 loc) · 1.93 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
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
services:
postgres:
image: postgres:16
container_name: booktrack-postgres
environment:
POSTGRES_DB: booktrack
POSTGRES_USER: booktrack
POSTGRES_PASSWORD: booktrack123
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U booktrack"]
interval: 10s
timeout: 5s
retries: 5
networks:
- booktrack-network
app:
build:
context: .
dockerfile: Dockerfile
container_name: booktrack-app
depends_on:
postgres:
condition: service_healthy
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/booktrack
SPRING_DATASOURCE_USERNAME: booktrack
SPRING_DATASOURCE_PASSWORD: booktrack123
JWT_SECRET_KEY: 404E635266556A586E3272357538782F413F4428472B4B6250645367566B5970
SPRING_PROFILES_ACTIVE: docker
ports:
- "8080:8080"
networks:
- booktrack-network
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: booktrack-prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
networks:
- booktrack-network
restart: unless-stopped
grafana:
image: grafana/grafana:latest
container_name: booktrack-grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
networks:
- booktrack-network
restart: unless-stopped
volumes:
postgres_data:
prometheus_data:
grafana_data:
networks:
booktrack-network:
driver: bridge