-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (56 loc) · 1.54 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
version: '3'
services:
backend:
image: fan9704/iptable_controller_backend
privileged: true
environment:
- MONGO_DB_HOST=${MONGO_DB_HOST}
- MONGO_DB_PORT=${MONGO_DB_PORT}
- MONGO_DB_USERNAME=${MONGO_DB_USERNAME}
- MONGO_DB_PASSWORD=${MONGO_DB_PASSWORD}
- MONGO_DB_DATABASE=network
- IPTALBES_LEGACY=true
depends_on:
- mongodb
network_mode: "host"
mongodb:
image: mongo
container_name: mongodb
restart: always
networks:
- MONGO
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_DB_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DB_DATABASE}
TZ: Asia/Taipei
volumes:
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
- ./database/configdb:/data/configdb
- ./database/data:/data/db
- ./mongod.conf:/etc/mongo/mongod.conf
ports:
- '0.0.0.0:27017:27017'
mongo-express:
image: mongo-express
restart: always
networks:
- MONGO
environment:
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_MONGODB_PORT: ${MONGO_DB_PORT}
ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_DB_USERNAME}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_DB_PASSWORD}
VCAP_APP_PORT: ${MONGO_EXPRESS_EXPORT_PORT}
ME_CONFIG_BASICAUTH_USERNAME: ${MONGO_EXPRESS_USERNAME}
ME_CONFIG_BASICAUTH_PASSWORD: ${MONGO_EXPRESS_PASSWORD}
depends_on:
- mongodb
ports:
- '0.0.0.0:8081:8081'
networks:
MONGO:
driver: bridge
volumes:
MONGO_DATA:
MONGO_CONFIG: