-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (71 loc) · 2.18 KB
/
docker-compose.yml
File metadata and controls
76 lines (71 loc) · 2.18 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
services:
app:
build: .
network_mode: "host"
environment:
- SPRING_PROFILES_ACTIVE=prod
- AWS_DEFAULT_REGION=ap-northeast-2
- SPRING_DATA_REDIS_HOST=master.sooktin-redis.dvwzww.apn2.cache.amazonaws.com
- JAVA_TOOL_OPTIONS=-XX:-UseContainerSupport
depends_on:
- rabbitmq
rabbitmq:
image: rabbitmq:3-management
network_mode: "host"
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
volumes:
- ./rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
command: >
sh -c "
rabbitmq-plugins enable rabbitmq_stomp rabbitmq_web_stomp &&
rabbitmq-server
"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "ping"]
interval: 30s
timeout: 10s
retries: 5
start_period: 40s
restart: unless-stopped
nginx:
image: nginx:latest
network_mode: host
volumes:
- ./nginx-default.conf:/etc/nginx/conf.d/default.conf
- /etc/letsencrypt:/etc/letsencrypt:ro
depends_on:
- app
prometheus:
image: prom/prometheus:latest
network_mode: "host" # host 모드로 localhost 통신 가능
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
- '--web.listen-address=0.0.0.0:9090' # 포트 명시
restart: unless-stopped
# Grafana - 대시보드
grafana:
image: grafana/grafana:latest
network_mode: "host" # host 모드로 prometheus 접근 가능
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=sooktin2024!
- GF_USERS_ALLOW_SIGN_UP=false
- GF_SERVER_HTTP_PORT=3000
- GF_SERVER_ROOT_URL=https://sooktin.duckdns.org/grafana/
- GF_SERVER_SERVE_FROM_SUB_PATH=true
volumes:
- grafana_data:/var/lib/grafana
restart: unless-stopped
volumes:
prometheus_data:
grafana_data: