-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
41 lines (41 loc) · 983 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
41
version: '3'
services:
backend:
build: .
container_name: ctf_app
restart: always
command: python server/run.py
depends_on:
- mysql
volumes:
- ./src:/usr/src/app/src/
- ./server:/usr/src/app/server/
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "5000:5000"
environment:
DATABASE_URL: mysql://user:pass@ctf_mysql/ctf
ADMIN_TOKEN: secret
HOST_IP: 192.168.1.234
proxy:
container_name: ctf_proxy
image: nginx
restart: always
depends_on:
- backend
ports:
- 80:80
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/80/:/etc/nginx/conf.d/
mysql:
image: mysql:8.0.18
restart: always
container_name: ctf_mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: my-secret-pw
MYSQL_DATABASE: ctf
MYSQL_USER: user
MYSQL_PASSWORD: pass