feat: initial commit

This commit is contained in:
2026-03-05 22:12:38 +01:00
commit bce762a783
380 changed files with 51955 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env python3
"""Run migrations and seed templates. Called at container startup."""
import asyncio
import subprocess
import sys
def run_migrations():
result = subprocess.run(
["alembic", "upgrade", "head"],
capture_output=True,
text=True,
)
if result.returncode != 0:
print(f"Migration failed:\n{result.stderr}", file=sys.stderr)
sys.exit(1)
print(result.stdout)
async def main():
run_migrations()
from app.config import settings
from app.utils.seed_templates import seed
await seed(settings.database_url)
if __name__ == "__main__":
asyncio.run(main())