-
Notifications
You must be signed in to change notification settings - Fork 62
/
docker-compose.yml
93 lines (90 loc) · 2.25 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
services:
db:
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
container_name: db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ocean
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ocean
LANG: C.UTF-8
TZ: ${TZ}
privileged: true
redis:
image: redis:latest
container_name: redis
logging:
driver: "json-file"
options:
max-size: "10m"
restart: unless-stopped
privileged: true
command: redis-server --requirepass ${REDIS_PASSWORD}
environment:
TZ: ${TZ}
web:
build:
context: .
dockerfile: ./install/docker/ocean_web.Dockerfile
image: ocean_web:v1.9
container_name: web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/ocean_ctf:/opt/ocean_ctf
- /opt/vulnerability:/opt/vulnerability
depends_on:
- db
- redis
restart: always
working_dir: /opt/ocean_ctf
command: "uwsgi --ini uwsgi.ini"
environment:
TZ: ${TZ}
worker:
build:
context: .
dockerfile: ./install/docker/ocean_web.Dockerfile
image: ocean_web:v1.9
container_name: worker
depends_on:
- db
- redis
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/ocean_ctf:/opt/ocean_ctf
- /opt/vulnerability:/opt/vulnerability
restart: unless-stopped
working_dir: /opt/ocean_ctf
command: celery -A app.worker:celery worker -l info
environment:
TZ: ${TZ}
beat:
build:
context: .
dockerfile: ./install/docker/ocean_web.Dockerfile
image: ocean_web:v1.9
container_name: beat
depends_on:
- db
- redis
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/ocean_ctf:/opt/ocean_ctf
- /opt/vulnerability:/opt/vulnerability
restart: unless-stopped
working_dir: /opt/ocean_ctf
command: celery -A app.worker:celery beat -l info
environment:
TZ: ${TZ}
nginx:
image: nginx:latest
ports:
- "${HTTP_PORT}:80"
container_name: nginx
volumes:
- /opt/ocean_ctf/install/nginx.conf:/etc/nginx/nginx.conf
- /opt/ocean_ctf:/opt/ocean_ctf
environment:
TZ: ${TZ}