mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
feat: Allow configuring app port using ROMM_PORT environment variable
By using the `ROMM_PORT` environment variable, users can now configure the port on which the application listens, which defaults to `8080`.
This commit is contained in:
@@ -33,6 +33,11 @@ for var_name in $(printenv | cut -d= -f1 | grep "_FILE$" || true); do
|
||||
unset "${var_name}"
|
||||
done
|
||||
|
||||
# Set default values for environment variables used by nginx templates.
|
||||
# Nginx uses `envsubst` to load environment variables into configuration files, but it does not
|
||||
# support the default value syntax `${VAR:-default}`.
|
||||
: "${ROMM_PORT:=8080}"
|
||||
|
||||
# Replace environment variables used in nginx configuration templates.
|
||||
/docker-entrypoint.d/20-envsubst-on-templates.sh >/dev/null
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
server {
|
||||
root /var/www/html;
|
||||
listen 8080;
|
||||
listen ${ROMM_PORT};
|
||||
server_name localhost;
|
||||
|
||||
proxy_set_header Host $http_host;
|
||||
|
||||
Reference in New Issue
Block a user