forked from tracyhenry/Kyrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (65 loc) · 1.93 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
#
# to start up, simply run "./run-kyrix.sh" or "docker-compose up"
# - kyrix frontend will be available on port 8000 by default
# - postgres backend will be available on port 5432 by default (for debugging)
#
version: '3.4'
services:
db:
command:
- "postgres"
- "-c"
- "max_parallel_maintenance_workers=24"
- "-c"
- "checkpoint_timeout=120min"
- "-c"
- "max_wal_size=50GB"
- "-c"
- "min_wal_size=80MB"
- "-c"
- "max_worker_processes=24"
- "-c"
- "maintenance_work_mem=10GB"
- "-c"
- "autovacuum_max_workers=1"
- "-c"
- "effective_cache_size=15GB"
- "-c"
- "shared_buffers=1GB"
- "-c"
- "work_mem=1GB"
- "-c"
- "max_parallel_workers=24"
- "-c"
- "max_parallel_workers_per_gather=24"
- "-c"
- "plv8.start_proc=commonjs.plv8_startup"
build:
context: .
dockerfile: docker-scripts/Dockerfile-db
target: "${BUILD_STAGE:-pg-plv8}"
restart: always
ports: # comment-out for extra security or to avoid conflicts with host OS
- "${DB_PORT:-5432}:5432"
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-kyrixftw}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
# for backup - requires special config on MacOS host OSs
# volumes:
# - /etc/postgresql:/etc/postgresql
# - /var/log/postgresql:/var/log/postgresql
# - /var/lib/postgresql:/var/lib/postgresql
kyrix:
build:
context: .
dockerfile: docker-scripts/Dockerfile-kyrix-alpine
ports:
- "${KYRIX_PORT:-8000}:8000"
depends_on:
- db
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-kyrixftw}
KYRIX_PORT: ${KYRIX_PORT:-8000}
START_APP: ${START_APP:-0}
KYRIX_MAVEN_OPTS: ${KYRIX_MAVEN_OPTS:-"-Xmx512m"} # default 512M JVM memory
entrypoint: sh -c 'sleep 5; /wait-for-postgres db:5432 -t 60 -- /start-kyrix.sh; tail -f /dev/null'