forked from mtianyan/VueDjangoAntdProBookShop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
71 lines (60 loc) · 1.57 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
version: '3'
services:
# mtianyan_mysql:
# image: mysql:8.0
# platform: linux/amd64
# restart: always
# command: --default-authentication-plugin=mysql_native_password --mysqlx=0
# environment:
# - MYSQL_PORT=3306 # cannot change this port to other number
# - MYSQL_DATABASE=vue_shop # name you want for the database
# - MYSQL_USER=root # change to whatever username you wantr
# - MYSQL_ROOT_PASSWORD=dev #change to good root password
# volumes:
# - mysql_data:/var/lib/mysql
# - "./sql:/sql"
mtianyan_mysql:
image: mysql:8.0
platform: linux/amd64
volumes:
- mysql_data:/var/lib/mysql/
- "./sql:/sql"
restart: always
environment:
MYSQL_ROOT_PASSWORD: root # root: root
# project:
MYSQL_DATABASE: dev
MYSQL_USER: dev
MYSQL_PASSWORD: dev
# fix utf8:
command: >
mysqld
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
ports:
- "0.0.0.0:3306:3306"
mtianyan_nginx:
restart: always
image: nginx
platform: linux/amd64
ports:
- "8000:80"
volumes:
- ./conf/nginx_book.conf:/etc/nginx/conf.d/nginx_book.conf
volumes_from:
- mtianyan_book_store
links:
- mtianyan_book_store:web
mtianyan_book_store:
restart: always
environment:
- USE_DOCKER=1
build: .
volumes:
- .:/VueDjangoFrameWorkShop
- ./conf/uwsgi.ini:/etc/uwsgi.ini
links:
- mtianyan_mysql:mysql
command: uwsgi -i /etc/uwsgi.ini
volumes:
mysql_data: