mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 05:02:58 +03:00
fix: rootless Caddy data and configuration (#470)
This commit is contained in:
@@ -7,6 +7,11 @@ cd backend && ./pocket-id-backend &
|
||||
if [ "$CADDY_DISABLED" != "true" ]; then
|
||||
echo "Starting Caddy..."
|
||||
|
||||
# https://caddyserver.com/docs/conventions#data-directory
|
||||
export XDG_DATA_HOME=/app/backend/data/.local/share
|
||||
# https://caddyserver.com/docs/conventions#configuration-directory
|
||||
export XDG_CONFIG_HOME=/app/backend/data/.config
|
||||
|
||||
# Check if TRUST_PROXY is set to true and use the appropriate Caddyfile
|
||||
if [ "$TRUST_PROXY" = "true" ]; then
|
||||
caddy run --adapter caddyfile --config /etc/caddy/Caddyfile.trust-proxy &
|
||||
|
||||
Reference in New Issue
Block a user