Containerize for Pi: env-var config, compose stack, CI workflow
Some checks failed
build-and-deploy / build (push) Failing after 18s
Some checks failed
build-and-deploy / build (push) Failing after 18s
- Add app/config.py (12-factor, env-driven: DB/NATS/MinIO, URL-encoded pw) - Route database/ingestor/sources/alembic through config; kill hardcoded svc.cluster.local hostnames - Drop unused redis dependency - Add docker-compose.yml (timescaledb-postgis pg13 arm64 + optional nats) - Add .env.example, .dockerignore, .forgejo/workflows/build.yml (arm64 build+SSH deploy)
This commit is contained in:
parent
93b8b89639
commit
3d53ed2c1c
11 changed files with 175 additions and 17 deletions
|
|
@ -13,6 +13,9 @@ sys.path.insert(0, str(Path(__file__).parent.parent / "app"))
|
|||
from database import metadata, DATABASE_URL
|
||||
|
||||
config = context.config
|
||||
# Prefer the app's env-driven DATABASE_URL over the ini placeholder so
|
||||
# migrations always target the same database the app connects to.
|
||||
config.set_main_option("sqlalchemy.url", DATABASE_URL)
|
||||
if config.config_file_name is not None:
|
||||
fileConfig(config.config_file_name)
|
||||
target_metadata = metadata
|
||||
|
|
|
|||
Loading…
Reference in a new issue