fix(easypanel): expand env vars in container config generator

This commit is contained in:
Cesar Jhoanny Mendivil Rubio 2025-10-01 15:55:42 -07:00
parent 8fad322967
commit e9b3d8c12d

View File

@ -12,6 +12,27 @@ general:
api_key: "${LIBRETIME_API_KEY:-}"
secret_key: "${LIBRETIME_SECRET_KEY:-}"
database:
host: ${POSTGRES_HOST:-postgres}
port: ${POSTGRES_PORT:-5432}
name: ${POSTGRES_DB:-libretime}
user: ${POSTGRES_USER:-libretime}
password: "${POSTGRES_PASSWORD}"
#!/bin/sh
# Generador de config para EasyPanel
# Lee variables de entorno y escribe /config/config.yml
set -eu
CONFIG_PATH=/config/config.yml
# Usar heredoc sin comillas para permitir expansión de variables
cat > "$CONFIG_PATH" <<EOF
general:
public_url: "${LIBRETIME_GENERAL_PUBLIC_URL:-http://localhost:8080}"
api_key: "${LIBRETIME_API_KEY:-}"
secret_key: "${LIBRETIME_SECRET_KEY:-}"
database:
host: ${POSTGRES_HOST:-postgres}
port: ${POSTGRES_PORT:-5432}