-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
104 lines (93 loc) · 2.36 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
94
95
96
97
98
99
100
101
102
103
104
---
version: "3.7"
# This Docker composition file is used to build and test the container
secrets:
admiral_yml:
file: ./src/secrets/admiral.yml
mongo_root_passwd_txt:
file: ./src/secrets/mongo-root-passwd.txt
redis_conf:
file: ./src/secrets/redis.conf
sslmate_api_key_txt:
file: ./src/secrets/sslmate-api-key.txt
x-admiral-template: &admiral-template
build:
context: .
dockerfile: Dockerfile
deploy:
mode: replicated
replicas: 5
environment:
ADMIRAL_CONFIG_FILE: "/run/secrets/admiral.yml"
ADMIRAL_CONFIG_SECTION: dev-mode
ADMIRAL_WORKER_NAME: dev
image: cisagov/admiral
init: true
secrets:
- source: admiral_yml
target: admiral.yml
- source: sslmate_api_key_txt
target: sslmate-api-key.txt
services:
celery-flower:
environment:
CELERY_BROKER_URL: "redis://:fruitcake@redis:6379/0"
image: mher/flower:1.2
ports:
- "5555:5555"
cert-worker:
<<: *admiral-template
environment:
ADMIRAL_CONFIG_SECTION: cert-worker
ADMIRAL_WORKER_NAME: cert
mongo:
environment:
MONGO_INITDB_DATABASE: certs
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD_FILE: /run/secrets/mongo_root_passwd_txt
image: mongo:4.2
restart: always
secrets:
- source: mongo_root_passwd_txt
volumes:
- ./init/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
mongo-express:
environment:
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
image: mongo-express:0.54
ports:
- "8083:8081"
restart: always
redis:
command:
- "redis-server"
- "/run/secrets/redis_conf"
image: redis:7.0-alpine
ports:
- "6379:6379"
secrets:
- source: redis_conf
redis-commander:
depends_on:
- redis
environment:
REDIS_HOSTS: "default:redis:6379:0:fruitcake"
hostname: redis-commander
image: ghcr.io/joeferner/redis-commander:0.8
ports:
- "8082:8081"
restart: always
scanner-worker:
<<: *admiral-template
environment:
ADMIRAL_CONFIG_SECTION: scanner-worker
ADMIRAL_WORKER_NAME: scanner
admiral-version:
# Run the container to collect version information
<<: *admiral-template
deploy:
mode: global
restart: "no"
command: --version