fix: Dockerfile, entrypoint, and CI for multi-repo deployment
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
- Fix requirements.txt path to shared_lib/requirements.txt - Guard alembic migrations with RUN_MIGRATIONS env var - Fix APP_MODULE default to app:app - CI: add git submodule update, deploy shared coop stack from /root/coop Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,9 +10,11 @@ if [[ -n "${DATABASE_HOST:-}" && -n "${DATABASE_PORT:-}" ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Run DB migrations (uses alembic.ini/env.py to resolve the DB URL)
|
||||
echo "Running Alembic migrations..."
|
||||
alembic upgrade head
|
||||
# Run DB migrations only if RUN_MIGRATIONS=true (blog service only)
|
||||
if [[ "${RUN_MIGRATIONS:-}" == "true" ]]; then
|
||||
echo "Running Alembic migrations..."
|
||||
alembic upgrade head
|
||||
fi
|
||||
|
||||
# Clear Redis page cache on deploy
|
||||
if [[ -n "${REDIS_URL:-}" && "${REDIS_URL}" != "no" ]]; then
|
||||
@@ -26,6 +28,5 @@ print('Redis cache cleared.')
|
||||
fi
|
||||
|
||||
# Start the app
|
||||
# APP_MODULE can be overridden per-service (e.g. apps.market.app:app)
|
||||
echo "Starting Hypercorn (${APP_MODULE:-suma_browser.app.app:app})..."
|
||||
PYTHONUNBUFFERED=1 exec hypercorn "${APP_MODULE:-suma_browser.app.app:app}" --bind 0.0.0.0:${PORT:-8000}
|
||||
echo "Starting Hypercorn (${APP_MODULE:-app:app})..."
|
||||
PYTHONUNBUFFERED=1 exec hypercorn "${APP_MODULE:-app:app}" --bind 0.0.0.0:${PORT:-8000}
|
||||
|
||||
Reference in New Issue
Block a user