forked from kookmin-sw/capstone-2024-30
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
107 lines (99 loc) · 2.15 KB
/
docker-compose.yml
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
## Production Deploy Version
version: '3'
services:
redis:
image: redis:7.2.0-alpine
container_name: redis
hostname: redis
restart: unless-stopped
environment:
TZ: "Asia/Seoul"
ports:
- 6379:6379
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 5s
timeout: 3s
retries: 10
networks:
- backend_network
spring_gateway:
container_name: spring_gateway
restart: always
image: capstone30/spring-gateway
env_file:
- .env
environment:
TZ: "Asia/Seoul"
ports:
- "8081:8081"
networks:
- gateway_network
- backend_network
spring:
container_name: spring
restart: always
image: capstone30/spring
env_file:
- .env
environment:
TZ : "Asia/Seoul"
ports:
- "8080:8080"
depends_on:
redis:
condition: service_healthy
volumes:
- /path/to/logs:/container/path/to/logs
networks:
- backend_network
ruby:
container_name: ruby
restart: always
image: capstone30/ruby
env_file:
- .env
environment:
TZ: "Asia/Seoul"
ports:
- "3000:3000"
networks:
- backend_network
nginx:
container_name: nginx
image: capstone30/nginx
restart: unless-stopped
environment:
TZ: "Asia/Seoul"
ports:
- "80:80"
- "443:443"
env_file:
- .env
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- "redis"
- "spring"
- "ruby"
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
networks:
- gateway_network
- ssl_network
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
- ssl_network
networks:
gateway_network:
driver: bridge
backend_network:
driver: bridge
ssl_network:
driver: bridge