-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
114 lines (108 loc) · 3.55 KB
/
Copy pathdocker-compose.yml
File metadata and controls
114 lines (108 loc) · 3.55 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
services:
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/ssl:/etc/nginx/ssl:ro
- certbot_www:/var/www/certbot:ro
- certbot_conf:/etc/letsencrypt:ro
depends_on:
frontend:
condition: service_started
backend:
condition: service_healthy
restart: unless-stopped
frontend:
image: ghcr.io/ohhalim/membershipflow-front:latest
environment:
- NEXT_PUBLIC_API_URL=
# sitemap.ts/generateMetadata 등 Next 서버 프로세스가 브라우저 없이 backend를 직접 호출할 때 사용
- INTERNAL_API_URL=http://backend:8081
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
backend:
image: ghcr.io/ohhalim/membershipflow-backend:latest
ports:
- "${OBSERVABILITY_BIND_ADDRESS:-127.0.0.1}:8081:8081"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8081/actuator/health | grep -q UP"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
environment:
- DB_HOST=mysql
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- JWT_SECRET=${JWT_SECRET}
- JWT_ACCESS_TOKEN_EXPIRATION=${JWT_ACCESS_TOKEN_EXPIRATION:-3600000}
- JWT_REFRESH_TOKEN_EXPIRATION=${JWT_REFRESH_TOKEN_EXPIRATION:-2592000000}
- FRONTEND_URL=${FRONTEND_URL}
- OAUTH2_REDIRECT_URI=${OAUTH2_REDIRECT_URI}
- CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
- COOKIE_SECURE=${COOKIE_SECURE:-true}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- TOSS_CLIENT_KEY=${TOSS_CLIENT_KEY}
- TOSS_SECRET_KEY=${TOSS_SECRET_KEY}
- BILLING_ENCRYPTION_KEY=${BILLING_ENCRYPTION_KEY}
- PADDLE_API_KEY=${PADDLE_API_KEY}
- PADDLE_API_BASE_URL=${PADDLE_API_BASE_URL:-https://sandbox-api.paddle.com}
- PADDLE_MONTHLY_PRICE_ID=${PADDLE_MONTHLY_PRICE_ID}
- PADDLE_YEARLY_PRICE_ID=${PADDLE_YEARLY_PRICE_ID}
- PADDLE_WEBHOOK_SECRET=${PADDLE_WEBHOOK_SECRET}
- DISCORD_ERROR_WEBHOOK_URL=${DISCORD_ERROR_WEBHOOK_URL:-}
- APP_ENVIRONMENT=${APP_ENVIRONMENT:-production}
- JSON_LOG_FILE=/var/log/membershipflow/membershipflow.json
volumes:
- backend_logs:/var/log/membershipflow
depends_on:
mysql:
condition: service_healthy
restart: unless-stopped
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: membershipflow
MYSQL_CHARACTER_SET_SERVER: utf8mb4
MYSQL_COLLATION_SERVER: utf8mb4_unicode_ci
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 10
restart: unless-stopped
node-exporter:
image: prom/node-exporter:v1.8.2
ports:
- "${OBSERVABILITY_BIND_ADDRESS:-127.0.0.1}:9100:9100"
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--path.rootfs=/rootfs'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc|var/lib/docker/.+)($$|/)'
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro,rslave
restart: unless-stopped
certbot:
image: certbot/certbot
volumes:
- certbot_www:/var/www/certbot
- certbot_conf:/etc/letsencrypt
profiles:
- certbot
volumes:
mysql_data:
backend_logs:
certbot_www:
certbot_conf: