-
Notifications
You must be signed in to change notification settings - Fork 373
/
docker-compose.yml
37 lines (34 loc) · 929 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
mtianyan_mysql:
image: mysql:8.0
restart: always
command: --default-authentication-plugin=mysql_native_password --mysqlx=0
environment:
- MYSQL_PORT=3306 # cannot change this port to other number
- MYSQL_DATABASE=online_mooc # name you want for the database
- MYSQL_USER=root # change to whatever username you wantr
- MYSQL_ROOT_PASSWORD=mtianyanroot #change to good root password
volumes:
- "./db:/var/lib/mysql"
- "./sql:/sql"
mtianyan_nginx:
restart: always
image: nginx
ports:
- "8002:80"
volumes:
- ./conf/nginx.conf:/etc/nginx/conf.d/nginx.conf
volumes_from:
- mtianyan_mxonline3
links:
- mtianyan_mxonline3:web
mtianyan_mxonline3:
restart: always
build: .
environment:
- use_docker=1
volumes:
- .:/ProjectPath
- ./conf/uwsgi.ini:/etc/uwsgi.ini
links:
- mtianyan_mysql:mysql
command: uwsgi -i /etc/uwsgi.ini