-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (51 loc) · 1.17 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
version: '3.4'
x-environment: &environment
- ./env/.env.schema
- ./env/.env.defaults
- ./env/.env
x-mongo-rs-node: &mongo-rs-node
build:
context: docker/mongo
dockerfile: Dockerfile
image: chimeradb
restart: always
command: --replSet crs --bind_ip_all --keyFile /etc/mongo/mongod.keyfile
expose:
- 27017
env_file: *environment
environment:
- CHIMERADB_REPLICASET_PRIMARY=true
services:
nestjs:
build:
context: .
dockerfile: docker/nestjs/Dockerfile
image: chimera
container_name: chimera
hostname: chimera
command: yarn start:production
ports:
- 3000:3000
env_file: *environment
mongo-primary:
<<: *mongo-rs-node
container_name: chimeradb-primary
hostname: chimeradb-primary
volumes:
- primary_mongodata:/data/db
mongo-secondary:
<<: *mongo-rs-node
container_name: chimeradb-ares
hostname: chimeradb-ares
volumes:
- ares_mongodata:/data/db
mongo-arbiter:
<<: *mongo-rs-node
container_name: chimeradb-boreas
hostname: chimeradb-boreas
volumes:
- boreas_mongodata:/data/db
volumes:
primary_mongodata:
ares_mongodata:
boreas_mongodata: