config: fix media path at /var/thoughtsync (no env knob)
The media/data location is no longer configurable — DATA_DIR is a fixed constant (/var/thoughtsync) and THOUGHTSYNC_MEDIA_ROOT is removed, so a mutable path can't drift from where the volume is mounted. media_root() = DATA_DIR/media. Both compose files drop THOUGHTSYNC_DATA_DIR and mount the data volume at /var/thoughtsync (was the contradictory /data). conftest drops the stale MEDIA_ROOT monkeypatch (create_app never reads DATA_DIR). Net env surface: THOUGHTSYNC_DATABASE_URL (required) + THOUGHTSYNC_SECRET_KEY (optional break-glass). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm
This commit is contained in:
@@ -31,14 +31,13 @@ services:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
THOUGHTSYNC_DATABASE_URL: postgresql+asyncpg://thoughtsync:thoughtsync@db:5432/thoughtsync
|
||||
THOUGHTSYNC_DATA_DIR: /data
|
||||
PYTHONPATH: /app/src
|
||||
volumes:
|
||||
- ./pyproject.toml:/app/pyproject.toml
|
||||
- ./alembic.ini:/app/alembic.ini
|
||||
- ./alembic:/app/alembic
|
||||
- ./src:/app/src
|
||||
- thoughtsync-dev-data:/data
|
||||
- thoughtsync-dev-data:/var/thoughtsync
|
||||
ports:
|
||||
- "5000:5000"
|
||||
# Install deps, run migrations, then serve with live reload on the mounted src.
|
||||
|
||||
Reference in New Issue
Block a user