-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
97 lines (95 loc) · 2.19 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
version: '3.1'
services:
srv_mongo:
image: mongo:4.2-bionic
command: [--auth]
secrets:
- db_root_username
- db_root_password
environment:
- MONGO_INITDB_ROOT_USERNAME_FILE=/run/secrets/db_root_username
- MONGO_INITDB_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
volumes:
- /data/eensyaquap/mongo:/data/db
ports:
- 57017:27017
networks:
- eensyaqp-nw
container_name: ctn_mongo
tty: true
stdin_open: true
healthcheck:
test: "exit 0"
srv_rabbit:
image: rabbitmq:3.13-rc-management
ports:
- 35672:15672
- 5672:5672
networks:
- eensyaqp-nw
secrets:
- amqp_username
- amqp_password
environment:
- RABBITMQ_DEFAULT_USER=eensyiot-admin
- RABBITMQ_DEFAULT_PASS=33n5y4dm1n
stdin_open: true
tty: true
container_name: ctn_rabbit
healthcheck:
test: "exit 0"
srv_gin:
build:
context: .
args:
- SRC=${SRCDIR}
- LOG=${LOGDIR}
- RUN=${RUNDIR}
- ETC=${ETCDIR}
- BIN=${BINDIR}
- APPNAME=${APPNAME}
ports:
- 8081:8080
volumes:
- .:${SRCDIR}
environment:
- FLOG=${FLAG_FLOG}
- SILENT=${FLAG_SILENCE}
- GINMODE=${FLAG_GINMODE}
- AMQP_SERVER=srv_rabbit
- AMQP_LOGIN=eensyiot-admin:33n5y4dm1n
- AMQP_XNAME=configs_direct
- MONGO_DB_NAME=${MONGODBNAME}
- DB_SEED=${DBSEED}
# depends_on:
# srv_mongo:
# condition: service_healthy
# srv_rabbit:
# condition: service_healthy
networks:
- eensyaqp-nw
secrets:
- db_root_username
- db_root_password
- mongo_uri
- amqp_uri
container_name: ctn_gin
stdin_open: true
tty: true
# entrypoint: ["${BINDIR}/${APPNAME}"]
networks:
eensyaqp-nw:
driver: bridge
secrets:
db_root_username:
file: ./secrets/db_root_username.secret
db_root_password:
file: ./secrets/db_root_password.secret
mongo_uri:
file: ./secrets/mongo_uri.secret
amqp_username:
file: ./secrets/amqp_username.secret
amqp_password:
file: ./secrets/amqp_password.secret
amqp_uri:
file: ./secrets/amqp_uri.secret