forked from githublitao/api_automation_test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (81 loc) · 2.32 KB
/
docker-compose.yml
File metadata and controls
88 lines (81 loc) · 2.32 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3'
services:
api_automation_test:
build: .
container_name: api_automation_test
working_dir: /api_automation_test
restart: always
volumes:
- .:/api_automation_test
- ./cron:/var/spool/cron
depends_on:
- mysql
command:
- /bin/bash
- -c
- |
python manage.py makemigrations
python manage.py migrate
cp -r /opt/app-root/lib/python3.6/site-packages/suit/static/admin /api_automation_test/frontend/dist/static
cp -r /opt/app-root/lib/python3.6/site-packages/suit/static/suit /api_automation_test/frontend/dist/static
cp -rf /opt/app-root/lib/python3.6/site-packages/django/contrib/admin/static/admin /api_automation_test/frontend/dist/static
cp -r /opt/app-root/lib/python3.6/site-packages/rest_framework_swagger/static/rest_framework_swagger /api_automation_test/frontend/dist/static
cp -r /opt/app-root/lib/python3.6/site-packages/rest_framework/static/rest_framework /api_automation_test/frontend/dist/static
uwsgi --ini /api_automation_test/UwsgiScript/uwsgi.ini
while true; do sleep 1; done
expose:
- 8000
ports:
- 8000:8000
links:
- mysql
network_mode: bridge
logging:
options:
max-size: "12m"
max-file: "5"
driver: json-file
nginx:
build: nginx/.
container_name: auto_nginx
working_dir: /etc/nginx
ports:
- 80:80
- 8001:8001
- 8002:8002
restart: always
volumes:
- .:/api_automation_test
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./UwsgiScript/:/etc/script/
network_mode: bridge
depends_on:
- api_automation_test
links:
- api_automation_test
logging:
options:
max-size: "12m"
max-file: "5"
driver: json-file
mysql:
image: mysql:5.7
container_name: auto_mysql
expose:
- 3306
ports:
- 3306:3306
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_ROOT_HOST=%
volumes:
- ./mysql/:/docker-entrypoint-initdb.d/
- ./mysql/my.cnf:/etc/my.cnf
- /home/test_platform/datadir:/var/lib/mysql
network_mode: bridge
logging:
options:
max-size: "12m"
max-file: "5"
driver: json-file