-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
113 lines (104 loc) · 2.84 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: '3.4'
volumes:
mysite.mysqldb.volume:
name: mysite.mysqldb.volume
mysite.postgresdb.volume:
name: mysite.postgresdb.volume
services:
nginx:
image: nginx:1.18
container_name: mysite.nginx
ports:
- "8003:8003"
volumes:
- ./nginx/conf:/etc/nginx/conf.d
- ./nginx/uwsgi_params:/etc/nginx/uwsgi_params
- ./dist:/var/www/html
depends_on:
- djangoweb
mysqldb:
image: mysql:5.7
container_name: mysite.mysqldb
ports:
- 33060:3306
environment:
MYSQL_ROOT_PASSWORD: mysitepass
TZ: 'Asia/Shanghai'
volumes:
- mysite.mysqldb.volume:/var/lib/mysql
- ./mysql:/docker-entrypoint-initdb.d/
mongo:
image: mongo
container_name: mysite.mongo
restart: always
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: "mysiteuser"
MONGO_INITDB_ROOT_PASSWORD: "mysitepass"
postgresql:
image: postgres
container_name: mysite.postgresql
ports:
- 5432:5432
environment:
POSTGRES_DB: "mysite"
POSTGRES_USER: "mysiteuser"
POSTGRES_PASSWORD: "mysitepass"
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --locale=C"
volumes:
- mysite.postgresdb.volume:/var/lib/postgresql
- ./postgresql/create_init.sh:/docker-entrypoint-initdb.d/create_init.sh
ldap:
# https://github.com/rroemhild/docker-test-openldap
image: rroemhild/test-openldap
container_name: mysite.ldap
ports:
- 10389:10389
djangoweb:
build:
context: .
dockerfile: ./djangosrc/Dockerfile
container_name: mysite.djangoweb
command: ["/wait-for-it.sh", "mysqldb:3306", "--", "uwsgi", "--socket", ":8001", "--module", "mysite.wsgi"]
volumes:
- ./wait-for-it.sh:/wait-for-it.sh
- ./djangosrc:/code
- ./sqlite/db.sqlite3:/code/db.sqlite3
environment:
DEBUG: 1
AUTO_CREATE_PROJECT: 1
PROJECT_NAME: ${PROJECT_NAME:-Python-DockerVulspace-Django}
PROJECT_VERSION: ${PROJECT_VERSION:-v1.0.0}
ENGINE_NAME: ${ENGINE_NAME:-github-vul-test-django}
expose:
- "8001"
depends_on:
- mysqldb
- postgresql
- mongo
- ldap
flaskweb:
build:
context: .
dockerfile: ./flasksrc/Dockerfile
container_name: mysite.flaskweb
command: ["/wait-for-it.sh", "mysqldb:3306", "--", "python","-u","-m","flask","run","-h","0.0.0.0"]
volumes:
- ./wait-for-it.sh:/wait-for-it.sh
- ./flasksrc:/code
- ./sqlite/db.sqlite3:/code/db.sqlite3
environment:
FLASK_APP: app.py
DEBUG: 1
AUTO_CREATE_PROJECT: 1
PROJECT_NAME: ${PROJECT_NAME:-Python-DockerVulspace-Flask}
PROJECT_VERSION: ${PROJECT_VERSION:-v1.0.0}
ENGINE_NAME: ${ENGINE_NAME:-github-vul-test-flask}
expose:
- "5000"
depends_on:
- mysqldb
- postgresql
- mongo
- ldap