-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (61 loc) · 1.23 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
version: "3.8"
services:
client:
container_name: client
image: boj-client-img
build:
context: ./client
ports:
- "${CLIENT_PORT}:${CLIENT_PORT}"
env_file:
- ./client/.env
server:
image: boj-server-img
container_name: server
build:
context: ./server
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
depends_on:
- mysql
- redis
env_file:
- ./server/.env
environment:
- DB_HOSTNAME=mysql
- REDIS_HOSTNAME=redis
mysql:
container_name: mysql
image: mysql
ports:
- "${DB_PORT}:${DB_PORT}"
volumes:
- mysql_data:/var/lib/mysql
env_file:
- ./server/.env
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt:/etc/letsencrypt
depends_on:
- client
- server
redis:
image: redis
container_name: redis
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
volumes:
- redis_data:/data
volumes:
mysql_data:
redis_data: