-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
115 lines (109 loc) · 2.71 KB
/
docker-compose.yml
File metadata and controls
115 lines (109 loc) · 2.71 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
services:
meilisearch:
image: getmeili/meilisearch:v1.29
ports:
- "127.0.0.1:7700:7700"
volumes:
- meilisearch_data:/meili_data
- ./dumps:/dumps
environment:
- MEILI_NO_ANALYTICS=true
- MEILI_ENV=production
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
- MEILI_DUMP_DIR=/dumps
- MEILI_SNAPSHOT_DIR=/dumps
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
interval: 10s
timeout: 5s
retries: 5
postgres:
image: pgvector/pgvector:pg18
environment:
POSTGRES_DB: poliloom
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "127.0.0.1:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql
- ./init-db.sql:/docker-entrypoint-initdb.d/01-init.sql
- ./dumps:/dumps
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
postgres_test:
image: pgvector/pgvector:pg18
environment:
POSTGRES_DB: poliloom_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "127.0.0.1:5433:5432"
volumes:
- postgres_test_data:/var/lib/postgresql
- ./init-db.sql:/docker-entrypoint-initdb.d/01-init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
db-migrate:
image: ghcr.io/opensanctions/poliloom:${API_IMAGE_TAG:-latest}
build:
context: ./poliloom
dockerfile: Dockerfile
env_file:
- ./poliloom/.env
environment:
- PYTHONPATH=/app
command: alembic upgrade head
profiles:
- production
- init
api:
image: ghcr.io/opensanctions/poliloom:${API_IMAGE_TAG:-latest}
build:
context: ./poliloom
dockerfile: Dockerfile
ports:
- "127.0.0.1:8000:8000"
env_file:
- ./poliloom/.env
environment:
- PYTHONPATH=/app
- PORT=8000
- HF_HOME=/var/cache/huggingface
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
volumes:
- huggingface_cache:/var/cache/huggingface
- wikidata_cache:/var/cache/wikidata
depends_on:
db-migrate:
condition: service_completed_successfully
profiles:
- production
gui:
image: ghcr.io/opensanctions/poliloom-gui:${GUI_IMAGE_TAG:-latest}
build:
context: ./poliloom-gui
dockerfile: Dockerfile
ports:
- "127.0.0.1:3000:3000"
env_file:
- ./poliloom-gui/.env.local
environment:
- AUTH_TRUST_HOST=true
- PORT=3000
depends_on:
- api
profiles:
- production
volumes:
meilisearch_data:
postgres_data:
postgres_test_data:
huggingface_cache:
wikidata_cache: