Skip to content

Commit be64cad

Browse files
feat: add env variable to disable caddy
1 parent ac81cb9 commit be64cad

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

docs/docs/setup/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@ Environment variables that are only available when running Pingvin Share with Do
4949

5050
| Variable | Default Value | Description |
5151
| ----------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52-
| `TRUST_PROXY` | `false` | Whether Pingvin Share is behind a reverse proxy. If set to `true`, the `X-Forwarded-For` header is trusted. |
53-
| `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). |
52+
| `TRUST_PROXY` | `false` | Whether Pingvin Share is behind a reverse proxy. If set to `true`, the `X-Forwarded-For` header is trusted. |
53+
| `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. |
54+
| `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). |

scripts/docker/entrypoint.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@
33
# Copy default logo to the frontend public folder if it doesn't exist
44
cp -rn /tmp/img/* /opt/app/frontend/public/img
55

6-
# Start Caddy
7-
if [ "$TRUST_PROXY" = "true" ]; then
8-
caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile.trust-proxy &
6+
if [ "$CADDY_DISABLED" != "true" ]; then
7+
# Start Caddy
8+
echo "Starting Caddy..."
9+
if [ "$TRUST_PROXY" = "true" ]; then
10+
caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile.trust-proxy &
11+
else
12+
caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile &
13+
fi
914
else
10-
caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile &
15+
echo "Caddy is disabled. Skipping..."
1116
fi
1217

1318
# Run the frontend server

0 commit comments

Comments
 (0)