-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
docker-compose.yml
47 lines (45 loc) · 1.1 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
version: '3.7'
services:
haven:
build:
context: .
dockerfile: Dockerfile
depends_on:
- postgresql
ports:
- "3000:3000"
volumes:
- haven_storage:/storage
environment:
- RAILS_ENV=production
- HAVEN_DB_HOST=postgresql
- HAVEN_DB_NAME=haven
- HAVEN_DB_ROLE=haven
- HAVEN_DB_PASSWORD=supersecretrandomstring
- HAVEN_USER_PASS=ChangeMeN0W
postgresql:
image: postgres:13.2-alpine
ports:
- "5432:5432"
# https://www.postgresql.org/docs/current/static/non-durability.html
command: [
"postgres",
"-c", "max_connections=1000",
"-c", "synchronous_commit=off",
"-c", "fsync=off",
"-c", "full_page_writes=off",
"-c", "max_wal_size=4GB",
"-c", "checkpoint_timeout=30min",
"-c", "wal_level=logical"
]
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: haven
volumes:
- postgresqldata:/var/lib/postgresql/data
volumes:
postgresqldata:
external: false
haven_storage:
external: false