forked from second-hand-team-04/second-hand-max-be-b
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-deploy.yml
45 lines (41 loc) · 1.11 KB
/
docker-compose-deploy.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
version: '3.8'
services:
cache:
container_name: cache-redis
image: ${REDIS_IMAGE_NAME}
restart: always
hostname: cache-redis
ports:
- ${REDIS_CACHE_PORT}:6379
command: redis-server --requirepass ${REDIS_CACHE_PASSWORD}
app:
container_name: second-hand-app
image: ${APP_IMAGE_NAME}
ports:
- 8080:8080
environment:
- TZ=Asia/Seoul
depends_on:
- cache
nginx:
container_name: nginx
image: ${NGINX_IMAGE_NAME}
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/usr/share/nginx/html
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
depends_on:
- app
certbot:
container_name: certbot
image: ${CERTBOT_IMAGE_NAME}
restart: unless-stopped
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/usr/share/nginx/html
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"