Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (43 loc) · 1.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (43 loc) · 1.65 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
# Local containerized testing only (see docker/*.Dockerfile headers) - not
# what a later Render/Vercel deployment milestone will necessarily use.
# Two services, no orchestration beyond that: no Celery/Redis/Postgres/
# nginx, matching backend/pipeline_runner.py's own "no external limiter"
# design.
services:
backend:
build:
context: .
dockerfile: docker/backend.Dockerfile
ports:
- "8000:8000"
environment:
# Optional - falls back to Semantic Scholar's unauthenticated rate
# limit if unset, same as running the backend locally without a
# .env file (see core/config.py).
- SEMANTIC_SCHOLAR_API_KEY=${SEMANTIC_SCHOLAR_API_KEY:-}
volumes:
# data/jobs.db + per-topic embedding/cluster caches survive a
# `docker-compose down` / rebuild, same as the gitignored data/ dir
# does for a local (non-Docker) run.
- aporia-data:/app/data
# SPECTER2 (core/embedding/specter_encoder.py) is downloaded from the
# Hugging Face Hub the first time a job reaches the embedding stage,
# not at image build time - persisting the cache means that download
# only happens once across container restarts, not on every restart.
- hf-cache:/root/.cache/huggingface
frontend:
build:
context: frontend
dockerfile: ../docker/frontend.Dockerfile
ports:
- "3000:3000"
environment:
# Overrides vite.config.ts's preview.proxy target (127.0.0.1, the
# right value for local dev) to this compose network's backend
# service hostname.
- VITE_API_PROXY_TARGET=http://backend:8000
depends_on:
- backend
volumes:
aporia-data:
hf-cache: