feat: add env variable to disable caddy (#797)
This commit is contained in:
@@ -49,5 +49,6 @@ Environment variables that are only available when running Pingvin Share with Do
|
||||
|
||||
| Variable | Default Value | Description |
|
||||
| ----------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `TRUST_PROXY` | `false` | Whether Pingvin Share is behind a reverse proxy. If set to `true`, the `X-Forwarded-For` header is trusted. |
|
||||
| `PUID` and `PGID` | `1000` | The user and group ID of the user who should run Pingvin Share inside the Docker container and owns the files that are mounted with the volume. You can get the `PUID` and `GUID` of your user on your host machine by using the command `id`. For more information see [this article](https://docs.linuxserver.io/general/understanding-puid-and-pgid/#using-the-variables). |
|
||||
| `TRUST_PROXY` | `false` | Whether Pingvin Share is behind a reverse proxy. If set to `true`, the `X-Forwarded-For` header is trusted. |
|
||||
| `CADDY_DISABLED` | `false` | Configures if Pingvin Share is starting built-in Caddy. If set to `true`, Caddy will not be started. If disabled, you must configure your reverse proxy to correctly map all paths. Refer to the [official Caddyfile](https://github.com/stonith404/pingvin-share/blob/main/reverse-proxy/Caddyfile) for guidance. |
|
||||
| `PUID` and `PGID` | `1000` | The user and group ID of the user who should run Pingvin Share inside the Docker container and owns the files that are mounted with the volume. You can get the `PUID` and `GUID` of your user on your host machine by using the command `id`. For more information see [this article](https://docs.linuxserver.io/general/understanding-puid-and-pgid/#using-the-variables). |
|
||||
|
||||
@@ -3,11 +3,16 @@
|
||||
# Copy default logo to the frontend public folder if it doesn't exist
|
||||
cp -rn /tmp/img/* /opt/app/frontend/public/img
|
||||
|
||||
# Start Caddy
|
||||
if [ "$TRUST_PROXY" = "true" ]; then
|
||||
caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile.trust-proxy &
|
||||
if [ "$CADDY_DISABLED" != "true" ]; then
|
||||
# Start Caddy
|
||||
echo "Starting Caddy..."
|
||||
if [ "$TRUST_PROXY" = "true" ]; then
|
||||
caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile.trust-proxy &
|
||||
else
|
||||
caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile &
|
||||
fi
|
||||
else
|
||||
caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile &
|
||||
echo "Caddy is disabled. Skipping..."
|
||||
fi
|
||||
|
||||
# Run the frontend server
|
||||
|
||||
Reference in New Issue
Block a user