forked from wx6/tsinghuatuan
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
40 lines (40 loc) · 980 Bytes
/
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
wxvote:
image: cgcgbcbc/wxvote:2.1
environment:
- PRODUCTION=True
- DB_NAME=wxvote
- DB_HOST=db
- DB_USER=wxvote
- DB_PASSWORD=$WXVOTE_PASSWORD
- DB_PORT=3306
- SECRET_KEY=$WXVOTE_SECRET_KEY
- SITE_DOMAIN=$SITE_DOMAIN
links:
- db
volumes:
- ./upload:/usr/src/app/urlhandler/userpage/static/img
- ./static:/usr/src/app/urlhandler/static
privileged: true
restart: always
db:
image: mysql/mysql-server:5.7
environment:
- MYSQL_ROOT_PASSWORD=$WXVOTE_ROOT_PASSWORD
- MYSQL_DATABASE=wxvote
- MYSQL_USER=wxvote
- MYSQL_PASSWORD=$WXVOTE_PASSWORD
volumes:
- ./datadir:/var/lib/mysql
restart: always
web:
image: nginx:1.9.8
volumes:
- ./uwsgi_params:/etc/nginx/conf.d/uwsgi_params:ro
- ./wxvote.conf:/etc/nginx/conf.d/default.conf:ro
- ./static:/usr/share/nginx/static1:ro
- ./upload:/usr/share/nginx/upload/static1/img:ro
links:
- wxvote
ports:
- "80:80"
restart: always