fix: use dynamic APP_UPSTREAM_PORT in domain and install scripts

This commit is contained in:
lolwierd
2026-03-27 15:10:54 +05:30
parent d15254ab76
commit 442ae83280
2 changed files with 17 additions and 15 deletions

View File

@@ -3,6 +3,7 @@
APP_NAME="signoz"
APP_DIR="/var/excloud/apps"
SCRIPT_DIR="/var/excloud/scripts"
APP_UPSTREAM_PORT="${EXC_APP_UPSTREAM_PORT:-8080}"
DOMAIN="${1}"
@@ -37,7 +38,7 @@ set_env "SIGNOZ_ALERTMANAGER_SIGNOZ_EXTERNAL_URL" "${URL}" ".services.signoz.env
cat > /etc/caddy/Caddyfile << EOF
${URL} {
reverse_proxy localhost:8080
reverse_proxy localhost:${APP_UPSTREAM_PORT}
}
${URL}:4317 {
@@ -47,17 +48,17 @@ ${URL}:4317 {
${URL}:4318 {
reverse_proxy localhost:44318
}
${INTERNAL_URL} {
reverse_proxy localhost:8080
}
${INTERNAL_URL}:4317 {
reverse_proxy h2c://localhost:44317
}
${INTERNAL_URL}:4318 {
reverse_proxy localhost:44318
}
# ${INTERNAL_URL} {
# reverse_proxy localhost:${APP_UPSTREAM_PORT}
# }
#
# ${INTERNAL_URL}:4317 {
# reverse_proxy h2c://localhost:44317
# }
#
# ${INTERNAL_URL}:4318 {
# reverse_proxy localhost:44318
# }
EOF
echo "Caddyfile updated"

View File

@@ -4,6 +4,7 @@ APP_NAME="signoz"
APP_DIR="/var/excloud/apps"
SCRIPT_DIR="/var/excloud/scripts"
POSTGRES_DSN="postgres://postgres:your_password@localhost:5432/signoz?sslmode=disable"
APP_UPSTREAM_PORT="${EXC_APP_UPSTREAM_PORT:-8080}"
mkdir -p "${APP_DIR}"
mkdir -p "${SCRIPT_DIR}"
@@ -69,7 +70,7 @@ set_env() {
set_port "127.0.0.1:44317:4317" "$OTEL_SERVICE_PATH"
set_port "127.0.0.1:44318:4318" "$OTEL_SERVICE_PATH"
set_port "127.0.0.1:8080:8080" "$SIGNOZ_SERVICE_PATH"
set_port "127.0.0.1:${APP_UPSTREAM_PORT}:8080" "$SIGNOZ_SERVICE_PATH"
set_env "SIGNOZ_TOKENIZER_JWT_SECRET" "${JWT_SECRET}" ".services.signoz.environment"
# TODO Add support for postgres DSN
# set_env "SIGNOZ_SQLSTORE_PROVIDER" "${JWT_SECRET}" ".services.signoz.environment"