forked from gimdongwoo/docker-parse-mongo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
80 lines (80 loc) · 2.01 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
version: "2"
services:
mongo3:
container_name: mongo3
image: mongo:3.4
mem_reservation: 64m
ports:
- "27018:27018"
- "28018:28018"
networks:
- my-net
restart: always
volumes:
- ./data/rs0-3:/data/db
- ./keyfile:/srv/mongodb
entrypoint: [ "mongod", "--replSet", "rs0", "--nojournal", "--smallfiles", "--rest", "--noprealloc", "--port", "27018", "--auth", "--keyFile", "/srv/mongodb/mongodb-keyfile" ]
mongo2:
container_name: mongo2
image: mongo:3.4
mem_reservation: 256m
ports:
- "27019:27019"
- "28019:28019"
networks:
- my-net
restart: always
volumes:
- ./data/rs0-2:/data/db
- ./keyfile:/srv/mongodb
entrypoint: [ "mongod", "--replSet", "rs0", "--journal", "--smallfiles", "--rest", "--port", "27019", "--auth", "--keyFile", "/srv/mongodb/mongodb-keyfile" ]
mongo1:
container_name: mongo1
image: mongo:3.4
mem_reservation: 256m
ports:
- "27017:27017"
- "28017:28017"
networks:
- my-net
restart: always
volumes:
- ./data/rs0-1:/data/db
- ./keyfile:/srv/mongodb
entrypoint: [ "mongod", "--replSet", "rs0", "--journal", "--smallfiles", "--rest", "--port", "27017", "--auth", "--keyFile", "/srv/mongodb/mongodb-keyfile" ]
# Configures the MongoDB replicaset
mongosetup:
mem_reservation: 64m
build: ./mongosetup
networks:
- my-net
volumes:
- ./scripts:/scripts
- ./keyfile:/srv/mongodb
entrypoint: [ "/scripts/setup.sh" ]
# Parse-server
parseapi:
container_name: parseapi
mem_reservation: 256m
build: ./parse-server
networks:
- my-net
restart: always
volumes:
- ./parse-server/cloud:/parse/cloud
- ./parse-server/public:/parse/public
# nginx proxy
nginx:
container_name: nginx
mem_reservation: 64m
build: ./nginx/
depends_on:
- parseapi
networks:
- my-net
ports:
- "80:80"
restart: always
networks:
my-net:
driver: bridge