-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
85 lines (77 loc) ยท 1.83 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
version: "3"
services:
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- ./frontend/:/frontend
- build_folder:/frontend/build
- ./frontend/node_modules/:/frontend/node_modules
tty: true
db:
image: mysql:5.7
platform: linux/amd64 # ๋ก์ปฌ ํ๊ฒฝ์์๋ง
environment:
MYSQL_DATABASE: HeyDoctor
MYSQL_USER: heydoctor
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
ports:
- "3307:3306"
networks:
- app-tier
volumes:
- ./backend/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./backend/my.cnf:/etc/mysql/my.cnf
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p password"]
timeout: 5s
retries: 10
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "5001:5001"
depends_on:
- db
networks:
- app-tier
nginx:
container_name: nginx
restart: unless-stopped
build:
context: ./nginx
dockerfile: Dockerfile
ports:
- "80:80"
- "443:443"
expose:
- 80
- 443
volumes:
- build_folder:/var/www/frontend
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
depends_on:
- frontend
- backend
networks:
- app-tier
certbot: #certbot ์ปจํ
์ด๋ ์ถ๊ฐ
image: certbot/certbot
restart: unless-stopped
container_name: certbot
volumes:
- ./certbot/conf:/etc/letsencrypt #nginx์ปจํ
์ด๋์ certbot์ปจํ
์ด๋ ์ฐ๊ฒฐ
- ./certbot/www:/var/www/certbot
depends_on:
- nginx
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
app-tier:
driver: bridge
volumes:
build_folder: