forked from tongchengbin/ocean_ctf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (73 loc) · 1.72 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
version: "3"
services:
db:
image: mysql
container_name: db
command: --default-authentication-plugin=mysql_native_password
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ocean
LANG: C.UTF-8
volumes:
- ./install/db_init:/docker-entrypoint-initdb.d/
restart: unless-stopped
privileged: true
logging:
driver: "json-file"
options:
max-size: "10m"
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}
web:
build:
context: .
dockerfile: ./install/docker/ocean_web.Dockerfile
image: ocean_web:v1
ports:
- 8080:8080
container_name: web
volumes:
- /opt/ocean_ctf:/opt/ocean_ctf
depends_on:
- db
- redis
working_dir: /opt/ocean_ctf
command: uwsgi --http :8080 -w main:app
celery_worker:
build:
context: .
dockerfile: ./install/docker/ocean_web.Dockerfile
image: ocean_web:v1
volumes:
- /opt/ocean_ctf:/opt/ocean_ctf
container_name: celery_worker
depends_on:
- db
- redis
working_dir: /opt/ocean_ctf
command: celery -A app:celery_app worker -l info
privileged: true
celery_beat:
build:
context: .
dockerfile: ./install/docker/ocean_web.Dockerfile
image: ocean_web:v1
container_name: celery_beat
depends_on:
- db
- redis
volumes:
- /opt/ocean_ctf:/opt/ocean_ctf
working_dir: /opt/ocean_ctf
command: celery -A app:celery_app worker -l info
privileged: true