-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
100 lines (91 loc) · 2.4 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
---
version: "3.7"
secrets:
admiral_yml:
file: ./secrets/admiral.yml
mongo_root_passwd_txt:
file: ./secrets/mongo-root-passwd.txt
redis_conf:
file: ./secrets/redis.conf
sslmate_api_key_txt:
file: ./secrets/sslmate-api-key.txt
x-admiral-template: &admiral-template
build:
context: .
dockerfile: Dockerfile-admiral
deploy:
mode: replicated
replicas: 5
environment:
ADMIRAL_CONFIG_FILE: "/run/secrets/admiral.yml"
ADMIRAL_CONFIG_SECTION: dev-mode
ADMIRAL_WORKER_NAME: dev
image: admiral
init: true
secrets:
- source: admiral_yml
target: admiral.yml
- source: sslmate_api_key_txt
target: sslmate-api-key.txt
volumes: # map for development only, comment out otherwise
- ./src/admiral:/usr/src/admiral/admiral
services:
celery-flower:
environment:
# TODO: https://github.com/cisagov/admiral/issues/19
# move into the secrets raft
CELERY_BROKER_URL: "redis://:fruitcake@redis:6379/0"
# TODO: https://github.com/cisagov/admiral/issues/18
# replace this outdated image
image: crgwbr/docker-celery-flower
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