Add automatic plugin installation on first Docker deployment
- Add docker-entrypoint.sh: runs migrations and bootstraps plugins - Add bootstrap-plugins.sh: installs all plugins (disabled by default) - Update Dockerfile to use entrypoint - Plugins can now be enabled via Settings UI after first deployment - Idempotent: safe to run multiple times - Solves issue where imported prod databases had tables but no plugin registry
This commit is contained in:
@@ -123,6 +123,9 @@ COPY migrations/ ./migrations/
|
||||
COPY scripts/ ./scripts/
|
||||
COPY wsgi.py ./
|
||||
|
||||
# Make entrypoint and bootstrap scripts executable
|
||||
RUN chmod +x /app/scripts/docker-entrypoint.sh /app/scripts/bootstrap-plugins.sh
|
||||
|
||||
# Built SPA from stage 1. Flask serves it via register_frontend_routes.
|
||||
COPY --from=frontendbuild /build/frontend/dist ./frontend/dist
|
||||
|
||||
@@ -139,6 +142,9 @@ USER shopdb
|
||||
|
||||
EXPOSE 5001
|
||||
|
||||
# Entrypoint runs migrations and bootstraps plugins on first deployment
|
||||
ENTRYPOINT ["/app/scripts/docker-entrypoint.sh"]
|
||||
|
||||
# Probe the public health route, not the login endpoint. Probing POST
|
||||
# /api/auth/login logged a 400 every 30s and ran the credential path from a
|
||||
# health check. The route answers 200 even when the database is degraded, so the
|
||||
|
||||
Reference in New Issue
Block a user