-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (71 loc) · 1.6 KB
/
Copy pathdocker-compose.yml
File metadata and controls
77 lines (71 loc) · 1.6 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
services:
# 1. MySQL
db:
image: mysql:8.0
container_name: popspot-mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: popspot_db
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-proot" ]
interval: 5s
timeout: 5s
retries: 10
networks:
- popspot-network
# 2. Redis
redis:
image: redis:latest
container_name: popspot-redis
ports:
- "6379:6379"
networks:
- popspot-network
# 3. 스프링 부트 앱
app:
build: .
container_name: popspot-app
ports:
- "8080:8080"
env_file:
- backend/.env
environment:
- SPRING_PROFILES_ACTIVE=dev
- SPRING_DATA_REDIS_HOST=redis
- SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/popspot_db?useSSL=false&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=true
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
networks:
- popspot-network
# 4. 프로메테우스
prometheus:
image: prom/prometheus:latest
container_name: popspot-prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
depends_on:
- app
networks:
- popspot-network
# 5. 그라파나
grafana:
image: grafana/grafana:latest
container_name: popspot-grafana
ports:
- "3001:3000"
volumes:
- grafana_data:/var/lib/grafana
networks:
- popspot-network
networks:
popspot-network:
driver: bridge
volumes:
grafana_data: