Replaced monolithic modules/ package with a clean architecture:
- core/ config.py, utils.py
- ai/ models.py (ResilientModel), setup.py (init_models)
- story/ planner.py, writer.py, editor.py, style_persona.py, bible_tracker.py
- marketing/ cover.py, blurb.py, fonts.py, assets.py
- export/ exporter.py
- web/ app.py (Flask factory), db.py, helpers.py, tasks.py, routes/{auth,project,run,persona,admin}.py
- cli/ engine.py (run_generation), wizard.py (BookWizard)
Flask routes split into 5 Blueprints; all templates updated with blueprint-
prefixed url_for() calls. Dockerfile and docker-compose updated to use
web.app entry point and new package paths.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
43 lines
1.6 KiB
YAML
43 lines
1.6 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
bookapp:
|
|
build: .
|
|
container_name: bookapp
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5000:5000"
|
|
working_dir: /app
|
|
volumes:
|
|
# --- PERSISTENCE (Data & Login) ---
|
|
# These mounts ensure your projects and login tokens survive container resets
|
|
# HOST_PATH is defined in Portainer Environment Variables (e.g. /opt/bookapp)
|
|
- ${HOST_PATH:-.}/data:/app/data
|
|
- ${HOST_PATH:-.}/token.json:/app/token.json
|
|
- ${HOST_PATH:-.}/credentials.json:/app/credentials.json
|
|
# --- DEVELOPMENT (Code Sync) ---
|
|
# UNCOMMENT these lines only if you are developing and want to see changes instantly.
|
|
# For production/deployment, keep them commented out so the container uses the built image code.
|
|
# - ./core:/app/core
|
|
# - ./ai:/app/ai
|
|
# - ./story:/app/story
|
|
# - ./marketing:/app/marketing
|
|
# - ./export:/app/export
|
|
# - ./web:/app/web
|
|
# - ./cli:/app/cli
|
|
# - ./templates:/app/templates
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
- GOOGLE_APPLICATION_CREDENTIALS=/app/credentials.json
|
|
- PYTHONPATH=/app
|
|
- FLASK_SECRET_KEY=${FLASK_SECRET_KEY:-change_this_to_a_random_string}
|
|
- ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
|
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-change_me_in_portainer}
|
|
- FLASK_DEBUG=${FLASK_DEBUG:-False}
|
|
- GEMINI_API_KEY=${GEMINI_API_KEY}
|
|
- GCP_PROJECT=${GCP_PROJECT:-}
|
|
- GCP_LOCATION=${GCP_LOCATION:-us-central1}
|
|
- MODEL_LOGIC=${MODEL_LOGIC:-AUTO}
|
|
- MODEL_WRITER=${MODEL_WRITER:-AUTO}
|
|
- MODEL_ARTIST=${MODEL_ARTIST:-AUTO}
|
|
- MODEL_IMAGE=${MODEL_IMAGE:-AUTO} |