-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (44 loc) · 1.84 KB
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (44 loc) · 1.84 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
services:
backend:
build:
context: .
dockerfile: backend/Dockerfile
# Backend port. Override on the host with
# ADAPTIVE_LEARNER_PORT=… docker compose up; the dev default
# (18001) is non-standard so it coexists with anything on :8000.
ports:
- "${ADAPTIVE_LEARNER_PORT:-18001}:${ADAPTIVE_LEARNER_PORT:-18001}"
volumes:
- ./backend:/app
- adaptive-learner-data:/app/data
environment:
- PYTHONDONTWRITEBYTECODE=1
# Single canonical data dir; matches docker-compose.prod.yml.
# DB at $DATA_DIR/adaptive_learner.db, uploads at $DATA_DIR/uploads/,
# both inside the named volume.
- ADAPTIVE_LEARNER_DATA_DIR=/app/data
- ADAPTIVE_LEARNER_PORT=${ADAPTIVE_LEARNER_PORT:-18001}
- ADAPTIVE_LEARNER_CORS_ORIGINS=${ADAPTIVE_LEARNER_CORS_ORIGINS:-http://localhost:${ADAPTIVE_LEARNER_FRONTEND_PORT:-15174}}
command: sh -c 'uvicorn app.main:app --reload --host 0.0.0.0 --port ${ADAPTIVE_LEARNER_PORT:-18001}'
frontend:
image: node:24-slim
working_dir: /app
ports:
- "${ADAPTIVE_LEARNER_FRONTEND_PORT:-15174}:${ADAPTIVE_LEARNER_FRONTEND_PORT:-15174}"
volumes:
- ./frontend:/app
- frontend-modules:/app/node_modules
environment:
# Vite proxy target. Defaults to localhost in vite.config.ts
# (correct for `make dev`); inside Docker Compose the
# frontend container's localhost is itself, so route via the
# `backend` service name on the compose network.
- VITE_API_PROXY_TARGET=http://backend:${ADAPTIVE_LEARNER_PORT:-18001}
- ADAPTIVE_LEARNER_PORT=${ADAPTIVE_LEARNER_PORT:-18001}
- ADAPTIVE_LEARNER_FRONTEND_PORT=${ADAPTIVE_LEARNER_FRONTEND_PORT:-15174}
command: sh -c "npm install && npm run dev -- --host 0.0.0.0"
depends_on:
- backend
volumes:
adaptive-learner-data:
frontend-modules: