forked from ghosx/TiebaProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) · 950 Bytes
/
docker-compose.yml
File metadata and controls
45 lines (42 loc) · 950 Bytes
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
version: '3.4'
services:
db:
build:
context: ./mysql
dockerfile: Dockerfile
volumes:
- /home/tieba/mysql/data:/var/lib/mysql
- /home/tieba/mysql/log:/var/log/mysql
restart: always
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --init-connect='SET NAMES utf8mb4;'
expose:
- "3306"
environment:
- MYSQL_DATABASE=tiebaproject
- MYSQL_ROOT_PASSWORD=1BQnsRlwhOE5qfuY
web:
build:
context: ./web
dockerfile: Dockerfile
volumes:
- /home/tieba/django:/var/log/tieba
command: bash start.sh
ports:
- "8000:8000"
links:
- db
depends_on:
- db
restart: always
nginx:
build: ./nginx
ports:
- "80:80"
volumes:
- ./web/static:/usr/share/nginx/html/static
- /home/tieba/nginx:/home/logs
links:
- web
depends_on:
- web
restart: always