-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yml
More file actions
94 lines (88 loc) · 2.57 KB
/
Copy pathcompose.yml
File metadata and controls
94 lines (88 loc) · 2.57 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
services:
app:
image: 364660315242.dkr.ecr.ap-northeast-2.amazonaws.com/checkmo
container_name: checkmo-app
env_file:
- .env
environment:
SPRING_PROFILES_ACTIVE: aladin,jwt,mail,prod,redis,oauth2,s3
TZ: Asia/Seoul
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/health" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 60s
networks:
- app-network
prometheus:
image: prom/prometheus:v3.4.2
container_name: checkmo-prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.enable-lifecycle"
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
restart: unless-stopped
networks:
- app-network
depends_on:
app:
condition: service_healthy
grafana:
image: grafana/grafana-oss:12.0.2
container_name: checkmo-grafana
environment:
GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER:?GRAFANA_ADMIN_USER is required}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:?GRAFANA_ADMIN_PASSWORD is required}
GF_USERS_ALLOW_SIGN_UP: "false"
GF_SERVER_ROOT_URL: ${GRAFANA_ROOT_URL:-http://localhost:3000}
TZ: Asia/Seoul
ports:
- "127.0.0.1:${GRAFANA_PORT:-3000}:3000"
volumes:
- grafana_data:/var/lib/grafana
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning:ro
- ./monitoring/grafana/dashboards:/var/lib/grafana/dashboards:ro
restart: unless-stopped
networks:
- app-network
depends_on:
- prometheus
nginx:
image: nginx:alpine
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
# nginx 설정 파일 저장할 볼륨
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
# GitHub Actions에서 전송할 nginx 설정 파일들
- ./nginx/conf.d:/etc/nginx/conf.d:ro
# SSL 인증서 및 인증용 파일 공유
- /home/ubuntu/certbot/conf:/etc/letsencrypt
- /home/ubuntu/certbot/www:/var/www/certbot
restart: unless-stopped
networks:
- app-network
depends_on:
app:
condition: service_healthy
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- /home/ubuntu/certbot/conf:/etc/letsencrypt
- /home/ubuntu/certbot/www:/var/www/certbot
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
prometheus_data:
grafana_data: