Add run_migrations function to deploy.sh that automatically applies pending SQL migrations during deployment. Migrations are run after config installation and before service restart. Migration runner: - Sources /etc/silo/silod.env for SILO_DB_PASSWORD - Reads DB host/port/name/user from production config.yaml - Waits for database connectivity (5 retries) - Applies each migration file in order, skipping already-applied ones - Gracefully degrades if psql is missing or DB password is not set This fixes the missing migration 009 (auth tables) that caused: - 'column created_by of relation projects does not exist' - 'relation api_tokens does not exist' Also adds auth environment variables to silod.env.example: - SILO_SESSION_SECRET - SILO_ADMIN_USERNAME / SILO_ADMIN_PASSWORD - SILO_OIDC_CLIENT_SECRET, SILO_LDAP_BIND_PASSWORD
13 KiB
Executable File
13 KiB
Executable File