Piped
Piped copied to clipboard
Invalid port number substitution on restart (piped-frontend docker image)
Official Instance
- [ ] The bug is reproducible on the official hosted instance, or is API-related.
Describe the bug
Every time the frontend container (1337kavin/piped-frontend) is restarted, the port number in the NGINX configuration is modified as long as the configured port number ends with 80.
It looks like it is caused by this: https://github.com/TeamPiped/Piped/blob/8b8b823abdbcc3c57b455a390e6548444bcbacf8/docker/entrypoint.sh#L18:
The port number is replaced as long as it ends with 8080.
To Reproduce
Configure the docker container (1337kavin/piped-frontend) using the 8080 port number like this:
version: "3"
services:
piped-frontend:
image: 1337kavin/piped-frontend:latest
restart: unless-stopped
...
environment:
BACKEND_HOSTNAME: ...
HTTP_PORT: 8080
Expected behavior
The port number is only modified once
Logs/Errors
2025/03/23 02:04:06 [emerg] 10#10: invalid port in "808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
nginx: [emerg] invalid port in "808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
2025/03/23 02:04:27 [emerg] 11#11: invalid port in "80808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
nginx: [emerg] invalid port in "80808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
2025/03/23 02:04:44 [emerg] 9#9: invalid port in "8080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
nginx: [emerg] invalid port in "8080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
2025/03/23 02:05:00 [emerg] 11#11: invalid port in "808080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
nginx: [emerg] invalid port in "808080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
2025/03/23 02:05:15 [emerg] 11#11: invalid port in "80808080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
nginx: [emerg] invalid port in "80808080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
2025/03/23 02:05:24 [emerg] 10#10: invalid port in "8080808080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
nginx: [emerg] invalid port in "8080808080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
2025/03/23 02:05:34 [emerg] 11#11: invalid port in "808080808080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
nginx: [emerg] invalid port in "808080808080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
2025/03/23 02:05:43 [emerg] 9#9: host not found in "80808080808080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
nginx: [emerg] host not found in "80808080808080808080" of the "listen" directive in /etc/nginx/conf.d/default.conf:2
Browser, and OS with Version.
N/A
Additional context
No response