forked from opensanctions/opensanctions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (53 loc) · 1.24 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
version: "3.9"
services:
db:
image: postgres:13
expose:
- "5432"
# ports:
# - "127.0.0.1:5432:5432"
container_name: db
environment:
POSTGRES_USER: os
POSTGRES_PASSWORD: os
POSTGRES_DB: opensanctions
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- "./data/postgres/db:/var/lib/postgresql/data"
- "./data/postgres/logs:/var/log/postgresql"
tmpfs:
- "/tmp"
command:
- postgres
- "-c"
- "max_connections=500"
# - "-c"
# - "shared_buffers=1GB"
# - "-c"
# - "effective_cache_size=4GB"
# - "-c"
# - "maintenance_work_mem=500MB"
# - "-c"
# - "work_mem=1048kB"
# - "-c"
# - "max_wal_size=1GB"
# - "-c"
# - "wal_buffers=4MB"
deploy:
restart_policy:
condition: on-failure
app:
build: .
image: ghcr.io/opensanctions/opensanctions:latest
command: bash -c 'while !</dev/tcp/db/5432; do sleep 2; done; opensanctions crawl'
hostname: work
environment:
ZAVOD_DATABASE_URI: postgresql://os:os@db/opensanctions
volumes:
- "./data:/opensanctions/data"
- "./opensanctions:/opensanctions/opensanctions"
tmpfs:
- "/tmp"