-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (59 loc) · 1.33 KB
/
docker-compose.yml
File metadata and controls
64 lines (59 loc) · 1.33 KB
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
version: '3'
services:
lb-api:
image: $LB_IMAGE_NAME
build:
context: .
args:
- LB_IMAGE_NAME=$LB_IMAGE_NAME
- LB_HOST_PORT=$LB_HOST_PORT
- LB_CONTAINER_PORT=LB_CONTAINER_PORT
- MONGODB_IMAGE_NAME=$MONGODB_IMAGE_NAME
- MONGODB_HOST_DATA_VOLUME=$MONGODB_HOST_DATA_VOLUME
- MONGODB_CONTAINER_DATA_VOLUME=$MONGODB_CONTAINER_DATA_VOLUME
- MONGODB_HOST_DUMP_VOLUME=$MONGODB_HOST_DUMP_VOLUME
- MONGODB_CONTAINER_DUMP_VOLUME=$MONGODB_CONTAINER_DUMP_VOLUME
networks:
- mongodb
- lb-network
ports:
- $LB_HOST_PORT:$LB_CONTAINER_PORT
env_file:
- .env
links:
- mongodb
mongodb:
image: $MONGODB_IMAGE_NAME
command: --smallfiles
restart: always
networks:
- mongodb
volumes:
- $MONGODB_HOST_DATA_VOLUME:$MONGODB_CONTAINER_DATA_VOLUME
- $MONGODB_HOST_DUMP_VOLUME:$MONGODB_CONTAINER_DUMP_VOLUME
mongo-cli:
image: mongo
networks:
- mongodb
command: mongo mongodb:27017
links:
- mongodb
lb-cli:
image: $LB_IMAGE_NAME
networks:
- lb-network
command: sh
links:
- mongodb
mongo-dumps:
image: mongo
networks:
- mongodb
command: sh
links:
- mongodb
networks:
mongodb:
driver: bridge
lb-network:
driver: bridge