fix: use /bin/sh in postgres init script — Alpine has no bash

https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
This commit is contained in:
Claude 2026-03-26 11:47:58 +00:00
parent de4b5c49ab
commit d3ef4d2030
No known key found for this signature in database

View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/bin/sh
# Create a dedicated database and user for Forgejo. # Create a dedicated database and user for Forgejo.
# Runs once when the Postgres container is first initialised. # Runs once when the Postgres container is first initialised.
# FORGEJO_DB_PASSWORD must be set in the environment (via docker-compose.yml). # FORGEJO_DB_PASSWORD must be set in the environment (via docker-compose.yml).
set -euo pipefail set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
CREATE USER forgejo WITH PASSWORD '${FORGEJO_DB_PASSWORD}'; CREATE USER forgejo WITH PASSWORD '${FORGEJO_DB_PASSWORD}';