feat(P01): SLICE-01+02 — Dockerfile, .dockerignore, docker-compose.yml, FastAPI StaticFiles, PRAXIS_DB_PATH env (G-102 fix)
SLICE-01 (lead-developer): multi-stage Dockerfile (node:22-slim→python:3.12-slim), .dockerignore (excludes secrets/node_modules/.git), docker-compose.yml (port 8789, SQLite volume, env injection for all voice-service vars) SLICE-02 (backend-engineer+data-engineer): FastAPI mounts client/dist as StaticFiles at / after API routes (D-023, REQ-DEPLOY-13). G-102 MUST fix: db/store.py + db/migrate.py now read PRAXIS_DB_PATH from env so the Docker volume mount persists SQLite data. G-105 FIX: Dockerfile copies pyproject.toml before source (pip install layer cached, source changes don't invalidate). REQ-DEPLOY-01, 02, 13, 16 covered. ---ci--- project: praxis phase: 1 milestone: v0.2 status: execute slice: 01-02 wave: 1 ---/ci---
This commit is contained in:
+3
-1
@@ -2,10 +2,12 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sqlite3
|
||||
from pathlib import Path
|
||||
|
||||
_DEFAULT_DB_PATH = Path("praxis.db")
|
||||
# G-102 FIX: read PRAXIS_DB_PATH from env (must match db/store.py).
|
||||
_DEFAULT_DB_PATH = Path(os.environ.get("PRAXIS_DB_PATH", "praxis.db"))
|
||||
_DEFAULT_MIGRATIONS_DIR = Path(__file__).resolve().parent / "migrations"
|
||||
|
||||
|
||||
|
||||
+4
-1
@@ -13,6 +13,7 @@ No auth — learner_id is the hardcoded 'learner-1' (D-007).
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
import uuid
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
@@ -22,7 +23,9 @@ import aiosqlite
|
||||
|
||||
from db.migrate import apply_migrations
|
||||
|
||||
_DEFAULT_DB_PATH = "praxis.db"
|
||||
# G-102 FIX: read PRAXIS_DB_PATH from env so the Docker volume mount
|
||||
# actually persists data (docker-compose.yml sets PRAXIS_DB_PATH=/app/data/praxis.db).
|
||||
_DEFAULT_DB_PATH = os.environ.get("PRAXIS_DB_PATH", "praxis.db")
|
||||
HARDCODED_LEARNER_ID = "learner-1"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user