-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.production.yml
47 lines (43 loc) · 1.45 KB
/
docker-compose.production.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
version: "3"
services:
sherlock-db-service-dataset:
build:
context: ./backend/sherlock-db-service-dataset
dockerfile: Dockerfile
image: sherlock-db-service-dataset-production
sherlock-db-instance-dataset:
image: mongo:4
volumes:
- "./backend/db-instance-dataset/data/db/dataset:/data/db"
environment:
- MONGO_INITDB_DATABASE=dataset
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=password
# in case of: "WARNING: could not open statistics file "pg_stat_tmp/global.stat": Operation not permitted"
# first time
# 1) start without this tmpfs section
# 2) after postgres finished initialising bring the service down
# 3) enable the tmpfs and restart
sherlock-db-instance-fragment:
image: postgres:14
volumes:
- "./backend/db-instance-fragment/data/db/fragment:/var/lib/postgresql/data"
- type: tmpfs
target: /var/lib/postgresql/data/pg_stat_tmp
tmpfs:
# 256 Mb - beware the default, it's infinity(!)
size: 268435456
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=password
- POSTGRES_DB=fragment
ports:
- "5432:5432"
sherlock-db-instance-statistics:
image: mongo:4
volumes:
- "./backend/db-instance-statistics/data/db/statistics:/data/db"
environment:
- MONGO_INITDB_DATABASE=statistics
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=password