mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-06 17:15:38 -08:00
Fix for ports
This commit is contained in:
@@ -30,33 +30,4 @@ cat "${DEVCONTAINER_DIR}/resources/devcontainer-Dockerfile" >> "$OUT_FILE"
|
||||
|
||||
echo "Generated $OUT_FILE using root dir $ROOT_DIR" >&2
|
||||
|
||||
# Generate devcontainer nginx config from production template
|
||||
echo "Generating devcontainer nginx config"
|
||||
NGINX_TEMPLATE="${ROOT_DIR}/install/production-filesystem/services/config/nginx/netalertx.conf.template"
|
||||
NGINX_OUT="${DEVCONTAINER_DIR}/resources/devcontainer-overlay/services/config/nginx/netalertx.conf.template"
|
||||
|
||||
# Create output directory if it doesn't exist
|
||||
mkdir -p "$(dirname "$NGINX_OUT")"
|
||||
|
||||
# Start with header comment
|
||||
cat > "$NGINX_OUT" << 'EOF'
|
||||
# DO NOT MODIFY THIS FILE DIRECTLY. IT IS AUTO-GENERATED BY .devcontainer/scripts/generate-configs.sh
|
||||
# Generated from: install/production-filesystem/services/config/nginx/netalertx.conf.template
|
||||
|
||||
EOF
|
||||
|
||||
# Process the template: replace listen directive and inject Xdebug params
|
||||
sed 's/${LISTEN_ADDR}:${PORT}/0.0.0.0:20211/g' "$NGINX_TEMPLATE" | \
|
||||
awk '
|
||||
/fastcgi_param SCRIPT_NAME \$fastcgi_script_name;/ {
|
||||
print $0
|
||||
print ""
|
||||
print " fastcgi_param PHP_VALUE \"xdebug.remote_enable=1\";"
|
||||
next
|
||||
}
|
||||
{ print }
|
||||
' >> "$NGINX_OUT"
|
||||
|
||||
echo "Generated $NGINX_OUT from $NGINX_TEMPLATE" >&2
|
||||
|
||||
echo "Done."
|
||||
Reference in New Issue
Block a user