-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (55 loc) · 1.66 KB
/
docker-compose.yml
File metadata and controls
64 lines (55 loc) · 1.66 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
version: "3.8"
services:
# frontend:
# build:
# # 어디에서 도커를 시작할 것인가
# context: ./front-end
# dockerfile: Dockerfile
# image: frontend
# restart: always
# ######
# volumes:
# - /app/node_modules #도커 /app/node_modules는 맵핑을 따로 안해주겠다.
# - ./:/app # 로컬에 있는 모든 파일을 맵핑
# ########
# ports:
# # - 3000:3000
# - 3001:3001
# #######
# stdin_open: true
# environment:
# - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
# networks:
# - app-network
nginx:
restart: always
container_name: nginx
build:
context: ./nginx
# context: ./front-end
dockerfile: Dockerfile
#
volumes:
# - ./nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/data:/var/www/certbot
ports:
- "80:80"
- "443:443"
#
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
# networks:
# - app-network
certbot:
image: certbot/certbot:latest
container_name: certbot
# 발급후에 커맨드 아래 재발급용 커맨드로 바꿔준다.
# command: certonly --webroot --webroot-path=/var/www/certbot --email dongsu712@naver.com --agree-tos --no-eff-email -d rough-code.com
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/data:/var/www/certbot
- ./data/certbot/logs:/var/log/letsencrypt
# networks:
# app-network:
# driver: bridge