-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcompose.yml
60 lines (57 loc) · 1.84 KB
/
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
services:
mongodb:
# See https://hub.docker.com/_/mongo/ for documentation about
# MongoDB Docker images.
image: mongo:7.0.11
expose:
- ${MONGO_PORT}
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-guest}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-guest}
volumes:
# See https://docs.docker.com/storage/volumes/
#
# The 'Z' option tells Docker to label the content with a
# private unshared label. Private volumes can only be used by
# the current container. See
# https://docs.docker.com/engine/reference/commandline/run/
- type: volume
source: mongodb
target: /data/db:Z
command:
# MongoDB logs can drown out everything else, so we'll write
# them to a file. To watch the log messages, use: `docker exec
# -it <container> tail -f /var/log/mongodb/mongod.log`.
- '--quiet'
- '--logpath'
- '/var/log/mongodb/mongod.log'
healthcheck:
test: ["CMD", "mongosh", "localhost:${MONGO_PORT}/test", "--quiet"]
sdx-controller:
image: sdx-controller
depends_on:
mongodb:
# Another condition is `service_healthy`, and it will require
# the `healthcheck` above.
condition: service_started
tty: true
build: ./
ports:
- 8080:8080
environment:
# App settings.
- SDX_HOST=${SDX_HOST:-localhost}
- SDX_PORT=${SDX_PORT:-8080}
# Use mongodb service specified above.
- MONGO_HOST=mongodb
- MONGO_PORT=${MONGO_PORT:-27017}
- MONGO_USER=${MONGO_USER:-guest}
- MONGO_PASS=${MONGO_PASS:-guest}
- DB_NAME=${DB_NAME}
- DB_CONFIG_TABLE_NAME=${DB_CONFIG_TABLE_NAME}
# MQ settings
- MQ_HOST=${MQ_HOST}
- MQ_PORT=${MQ_PORT:-5672}
- SUB_QUEUE=${SUB_QUEUE}
volumes:
mongodb: