-
Notifications
You must be signed in to change notification settings - Fork 124
/
docker-compose.yml
88 lines (80 loc) · 2.83 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
version: '3'
volumes:
arl_db:
external: true
services:
web:
image: ki9mu/arl-ki9mu:v3.0.1
container_name: arl_web
restart: unless-stopped
depends_on:
- mongodb
- rabbitmq
ports:
#http 服务,默认不映射出来
#- "5003:80"
- "5003:443"
volumes:
- ./arl_web.log:/code/arl_web.log
- ./config-docker.yaml:/code/app/config.yaml
- ./image:/code/app/tmp_screenshot
- ./poc:/opt/ARL-NPoC/xing/plugins/upload_poc
entrypoint: ["sh", "-c", "gen_crt.sh; nginx; wait-for-it.sh mongodb:27017; wait-for-it.sh rabbitmq:5672; gunicorn -b 0.0.0.0:5003 app.main:arl_app -w 3 --access-logfile arl_web.log --access-logformat '%({x-real-ip}i)s %(l)s %(u)s %(t)s \"%(r)s\" %(s)s %(b)s \"%(f)s\" \"%(a)s\"'"]
environment:
- LANG=en_US.UTF-8
- TZ=Asia/Shanghai
worker:
image: ki9mu/arl-ki9mu:v3.0.1
container_name: arl_worker
restart: unless-stopped
depends_on:
- mongodb
- rabbitmq
volumes:
- ./arl_worker.log:/code/arl_worker.log
- ./config-docker.yaml:/code/app/config.yaml
- ./image:/code/app/tmp_screenshot
- ./poc:/opt/ARL-NPoC/xing/plugins/upload_poc
entrypoint: ["sh", "-c", "wait-for-it.sh mongodb:27017; wait-for-it.sh rabbitmq:5672;
celery -A app.celerytask.celery worker -l info -Q arlgithub -n arlgithub -c 2 -O fair -f arl_worker.log &
celery -A app.celerytask.celery worker -l info -Q arltask -n arltask -c 2 -O fair -f arl_worker.log"]
environment:
- LANG=en_US.UTF-8
- TZ=Asia/Shanghai
scheduler:
image: ki9mu/arl-ki9mu:v3.0.1
container_name: arl_scheduler
restart: unless-stopped
depends_on:
- mongodb
- rabbitmq
volumes:
- ./config-docker.yaml:/code/app/config.yaml
entrypoint: [ "sh", "-c", "wait-for-it.sh mongodb:27017; wait-for-it.sh rabbitmq:5672; python3.6 -m app.scheduler" ]
environment:
- LANG=en_US.UTF-8
- TZ=Asia/Shanghai
mongodb:
image: mongo:4.0.27
container_name: arl_mongodb
restart: always
volumes:
- arl_db:/data/db
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
environment:
- MONGO_INITDB_DATABASE=arl
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=admin
rabbitmq:
image: ki9mu/shadow-rabbitmq:latest
container_name: arl_rabbitmq
restart: always
environment:
- RABBITMQ_DEFAULT_PASS=arlpassword
- RABBITMQ_DEFAULT_USER=arl
- RABBITMQ_DEFAULT_VHOST=arlv2host
logging:
driver: "json-file"
options:
max-size: "1M"
max-file: "10"