-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.26 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
version: "3"
services:
nginxproxy:
depends_on:
- server
- client
image: nginx:alpine
ports:
- "80:80"
- "443:3000"
restart: always
volumes:
- ./certbot:/etc/letsencrypt
- ./https:/usr/share/nginx/html
- ./nginx.conf:/etc/nginx/nginx.conf
server:
build:
context: ./server
dockerfile: Dockerfile
restart: always
container_name: server
expose:
- "3001"
volumes:
- ./https:/usr/share/nginx/html
- ./server/picture:/app/picture
client:
build:
context: ./client
dockerfile: Dockerfile
restart: always
container_name: client
volumes:
- ./https:/usr/share/nginx/html
# cerbot:
# depends_on:
# - nginxproxy
# image: certbot/certbot
# container_name: cerbot
# volumes:
# - ./certbot:/etc/letsencrypt
# - ./https:/usr/share/nginx/html
# command: --dry-run certonly --webroot --webroot-path=/usr/share/nginx/html --email [email protected] --agree-tos --no-eff-email -d highlighters.site -d www.highlighters.site --force-renewal
#
# 인증서 재발급
# 1. docker-compose.yml에서 cerbot 주석 해제
# 2. nginx.conf에서 TLS 인증서 주석 해제
# 3. http -> https로 리다이렉트 주석 처리