-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdocker-compose_cn.yml
113 lines (110 loc) · 3.02 KB
/
docker-compose_cn.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
name: sec_report
services:
mongodb:
image: registry.ap-southeast-1.aliyuncs.com/sec-report/mongo:latest
container_name: mongodb
restart: always
secrets:
- mongodb_password
environment:
MONGO_INITDB_ROOT_USERNAME: sec_report
MONGO_INITDB_ROOT_PASSWORD_FILE: /run/secrets/mongodb_password
MONGO_INITDB_DATABASE: sec_report
volumes:
- ./data/mongo/db:/data/db
- ./data/mongo/util:/data/configdb
networks:
- sec_report
redis:
image: registry.ap-southeast-1.aliyuncs.com/sec-report/redis:latest
container_name: redis
restart: always
secrets:
- redis_password
command: [
"bash", "-c", 'docker-entrypoint.sh --requirepass `cat /run/secrets/redis_password`'
]
volumes:
- ./data/redis:/data
networks:
- sec_report
s3:
image: registry.ap-southeast-1.aliyuncs.com/sec-report/minio:latest
container_name: s3
restart: always
secrets:
- s3_password
environment:
- MINIO_ROOT_USER=admin
- MINIO_ROOT_PASSWORD_FILE=/run/secrets/s3_password
volumes:
- ./data/s3:/data
networks:
- sec_report
command: server /data --console-address ":9001"
editor-sync:
image: registry.ap-southeast-1.aliyuncs.com/sec-report/editor-sync:latest
container_name: editor_sync
restart: always
secrets:
- editor_sync_password
- redis_password
- mongodb_password
environment:
- PORT=8001
- EDITOR_SYNC_PASSWORD_FILE=/run/secrets/editor_sync_password
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD_FILE=/run/secrets/redis_password
- MONGO_HOST=mongodb
- MONGO_PORT=27017
- MONGO_USER=sec_report
- MONGO_PASSWORD_FILE=/run/secrets/mongodb_password
- MONGO_DATABASE=sec_report
networks:
- sec_report
sec-report:
image: registry.ap-southeast-1.aliyuncs.com/sec-report/sec-report:latest
container_name: sec_report
restart: always
depends_on:
- mongodb
- redis
- s3
- editor-sync
secrets:
- mongodb_password
- redis_password
- s3_password
- editor_sync_password
environment:
- listen=0.0.0.0:80
- redis_uri=redis:6379
- redis_password_file=/run/secrets/redis_password
- mongodb_name=sec_report
- mongodb_uri=mongodb://sec_report:{password}@mongodb:27017/
- mongodb_password_file=/run/secrets/mongodb_password
- s3_uri=s3:9000
- s3_region=us-east-1
- s3_bucket=sec-report
- s3_access_key=admin
- s3_secret_key_file=/run/secrets/s3_password
- editor_sync_uri=ws://editor-sync:8001
- editor_sync_password_file=/run/secrets/editor_sync_password
networks:
- sec_report
ports:
- 80:80
networks:
sec_report:
name: sec_report
driver: bridge
secrets:
mongodb_password:
file: ./mongodb_password.txt
redis_password:
file: ./redis_password.txt
s3_password:
file: ./s3_password.txt
editor_sync_password:
file: ./editor_sync_password.txt