-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (51 loc) · 1.2 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
version: "3.9"
services:
front:
build: ./frontend
container_name: front
ports:
- "3000:3000"
volumes:
- ./frontend:/frontend
command: ["yarn", "start"]
mongo:
image: mongo
container_name: mongo
expose:
- "27019"
volumes:
- ./mongo/data:/mongo
environment:
MONGO_INITDB_ROOT_USERNAME: "abc"
MONGO_INITDB_ROOT_PASSWORD: "1234"
back:
build: ./backend
container_name: back
ports:
- "4000:4000"
volumes:
- ./backend:/backend
command: ["yarn", "run", "start"]
depends_on:
- mongo
nginx:
build: ./nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
depends_on:
- front
- back
- mongo
certbot: # certbot 서비스 추가
image: certbot/certbot
container_name: certbot
volumes:
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"