mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
Wire up DBALProvider across all Qt6 views for live CRUD operations, add PackageLoader, MediaServicePanel, NotificationsPanel, SettingsView, and JSON-driven CMake config. Fix deployment helpers.py str|None syntax for Python 3.9 compatibility via __future__ annotations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
103 lines
2.9 KiB
YAML
103 lines
2.9 KiB
YAML
# Qt6 Dev Stack — lightweight DBAL + Media for local Qt6 development
|
|
#
|
|
# Usage:
|
|
# docker compose -f docker-compose.dev.yml up -d
|
|
# docker compose -f docker-compose.dev.yml --profile media up -d
|
|
#
|
|
# DBAL runs with SQLite in-memory (no Postgres/Redis/ES needed)
|
|
# Media daemon is optional (--profile media)
|
|
|
|
services:
|
|
# Copy schema/seed/template files into volumes
|
|
dbal-init:
|
|
image: alpine:3.19
|
|
container_name: qt6-dbal-init
|
|
command: >
|
|
sh -c "
|
|
cp -r /src/entities/* /schemas/ 2>/dev/null || true;
|
|
cp -r /src/templates/* /templates/ 2>/dev/null || true;
|
|
cp -r /src/seeds/* /seeds/ 2>/dev/null || true;
|
|
echo 'Init complete: schemas, templates, seeds copied';
|
|
"
|
|
working_dir: /src
|
|
volumes:
|
|
- ../../dbal/shared/api/schema/entities:/src/entities:ro
|
|
- ../../dbal/production/templates/sql:/src/templates:ro
|
|
- ../../dbal/shared/seeds/database:/src/seeds:ro
|
|
- dbal-schemas:/schemas
|
|
- dbal-templates:/templates
|
|
- dbal-seeds:/seeds
|
|
|
|
dbal:
|
|
build:
|
|
context: ../../dbal
|
|
dockerfile: production/build-config/Dockerfile
|
|
args:
|
|
BUILD_TYPE: Release
|
|
container_name: qt6-dbal
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
DBAL_ADAPTER: sqlite
|
|
DATABASE_URL: ":memory:"
|
|
DBAL_SCHEMA_DIR: /app/schemas/entities
|
|
DBAL_TEMPLATE_DIR: /app/templates/sql
|
|
DBAL_SEED_DIR: /app/seeds/database
|
|
DBAL_SEED_ON_STARTUP: "true"
|
|
DBAL_BIND_ADDRESS: 0.0.0.0
|
|
DBAL_PORT: 8080
|
|
DBAL_MODE: development
|
|
DBAL_DAEMON: "true"
|
|
DBAL_LOG_LEVEL: debug
|
|
DBAL_AUTO_CREATE_TABLES: "true"
|
|
DBAL_ENABLE_HEALTH_CHECK: "true"
|
|
DBAL_CORS_ORIGIN: "*"
|
|
DBAL_ADMIN_TOKEN: dev-token
|
|
JWT_SECRET_KEY: dev-secret
|
|
volumes:
|
|
- dbal-schemas:/app/schemas/entities:ro
|
|
- dbal-templates:/app/templates/sql:ro
|
|
- dbal-seeds:/app/seeds/database:ro
|
|
depends_on:
|
|
dbal-init:
|
|
condition: service_completed_successfully
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
# Optional: Media daemon (--profile media)
|
|
media-daemon:
|
|
build:
|
|
context: ../../services/media_daemon
|
|
dockerfile: Dockerfile
|
|
container_name: qt6-media-daemon
|
|
restart: unless-stopped
|
|
profiles: ["media"]
|
|
ports:
|
|
- "8090:8090"
|
|
environment:
|
|
MEDIA_PORT: 8090
|
|
MEDIA_BIND_ADDRESS: 0.0.0.0
|
|
MEDIA_WORKERS: 2
|
|
DBAL_URL: http://dbal:8080
|
|
MEDIA_RADIO_ENABLED: "false"
|
|
MEDIA_TV_ENABLED: "false"
|
|
depends_on:
|
|
dbal:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://127.0.0.1:8090/health"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 20s
|
|
|
|
volumes:
|
|
dbal-schemas:
|
|
dbal-templates:
|
|
dbal-seeds:
|