Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
82 lines (79 loc) · 3.14 KB
/
Copy pathdocker-compose.dev.yaml
File metadata and controls
82 lines (79 loc) · 3.14 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
# Development docker-compose: runs backend services only.
# Prefer `make dev`, which starts these services and then runs the SvelteKit
# frontend from omnipath-svelte.
#
# Active graph/search data comes from Postgres. The API service also mounts
# local OBO files from a sibling omnipath-build checkout for ontology lookup:
# ONTOLOGY_DIR=../omnipath-build/data/obo
# DATA_DIR and GOLD_ROOT_DIR are still mounted for legacy/archive code paths.
#
# PostgreSQL tuning defaults assume a 12GB host with SSD storage. Override
# POSTGRES_* values in .env or the shell for other host sizes.
services:
omnipathv2-postgres:
build:
context: ..
dockerfile: omnipath-present/postgres/Dockerfile
environment:
POSTGRES_DB: omnipath
POSTGRES_USER: omnipath
POSTGRES_PASSWORD: omnipath
ports:
- "55432:5432"
command:
- postgres
- -c
- shared_buffers=${POSTGRES_SHARED_BUFFERS:-3GB}
- -c
- work_mem=${POSTGRES_WORK_MEM:-32MB}
- -c
- maintenance_work_mem=${POSTGRES_MAINTENANCE_WORK_MEM:-1GB}
- -c
- effective_cache_size=${POSTGRES_EFFECTIVE_CACHE_SIZE:-9GB}
- -c
- max_wal_size=${POSTGRES_MAX_WAL_SIZE:-12GB}
- -c
- min_wal_size=${POSTGRES_MIN_WAL_SIZE:-2GB}
- -c
- checkpoint_timeout=${POSTGRES_CHECKPOINT_TIMEOUT:-15min}
- -c
- checkpoint_completion_target=${POSTGRES_CHECKPOINT_COMPLETION_TARGET:-0.9}
- -c
- random_page_cost=${POSTGRES_RANDOM_PAGE_COST:-1.1}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U omnipath -d omnipath"]
interval: 5s
timeout: 5s
retries: 20
volumes:
- postgres18_data:/var/lib/postgresql
# API Service - FastAPI wrapper for ontograph + graph-native exports
api-service:
build:
context: ..
dockerfile: omnipath-present/api-service/Dockerfile
restart: unless-stopped
environment:
ONTOLOGY_DATA_DIR: /data/obo
OMNIPATH_PARQUET_DIR: /data/parquet
ONTOLOGY_CACHE_DIR: /app/cache
OMNIPATH_GOLD_ROOT: /gold
DATABASE_URL: postgresql://omnipath:omnipath@omnipathv2-postgres:5432/omnipath
OMNIPATH_PG_SCHEMA: ${OMNIPATH_PG_SCHEMA:-public}
ports:
- "8081:8081"
volumes:
- ${DATA_DIR:-../omnipath-build/data/combined/latest}:/data/parquet:ro
- ${ONTOLOGY_DIR:-../omnipath-build/data/obo}:/data/obo:ro
- ${GOLD_ROOT_DIR:-../omnipath-build/data/gold}:/gold:ro
- ./api-service/cache:/app/cache
# Mount source for hot reload during development
- ./api-service/api_service:/app/api_service
depends_on:
omnipathv2-postgres:
condition: service_healthy
volumes:
ontology_cache:
name: ${ONTOLOGY_CACHE_VOLUME_NAME:-omnipath-ontology-cache}
postgres18_data:
name: ${POSTGRES_DATA_VOLUME_NAME:-omnipath-postgres18-data}