mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Devcontainer overlay
This commit is contained in:
@@ -51,7 +51,7 @@ server {
|
||||
location ~* \.php$ {
|
||||
# Set Cache-Control header to prevent caching on the first load
|
||||
add_header Cache-Control "no-store";
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass unix:/services/run/php.sock;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
pid /services/run/nginx.pid;
|
||||
|
||||
# Set number of worker processes automatically based on number of CPU cores.
|
||||
worker_processes auto;
|
||||
@@ -6,7 +7,7 @@ worker_processes auto;
|
||||
pcre_jit on;
|
||||
|
||||
# Configures default error logger.
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
error_log /app/log/nginx-error.log warn;
|
||||
|
||||
# Includes files with directives to load dynamic modules.
|
||||
include /etc/nginx/modules/*.conf;
|
||||
@@ -89,7 +90,7 @@ http {
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
# Sets the path, format, and configuration for a buffered log write.
|
||||
access_log /var/log/nginx/access.log main;
|
||||
access_log /app/log/nginx-access.log main;
|
||||
|
||||
|
||||
# Includes virtual hosts configs.
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
;
|
||||
|
||||
[global]
|
||||
pid = /run/php/php8.3-fpm.pid
|
||||
pid = /services/run/php8.3-fpm.pid
|
||||
error_log = /app/log/app.php_errors.log
|
||||
include=/services/config/php/php-fpm.d/*.conf
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
listen = 127.0.0.1:9000
|
||||
listen = /services/run/php.sock
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 511 (-1 on Linux, FreeBSD and OpenBSD)
|
||||
|
||||
@@ -6,7 +6,7 @@ export PYTHONPATH="${NETALERTX_SERVER}:${NETALERTX_APP}"
|
||||
|
||||
EXTRA_PARAMS=""
|
||||
if [ -f /services/config/python/backend-extra-launch-parameters ]; then
|
||||
EXTRA_PARAMS=$(cat /services/config/python-backend-extra-launch-parameters)
|
||||
EXTRA_PARAMS=$(cat /services/config/python/backend-extra-launch-parameters)
|
||||
fi
|
||||
|
||||
# Start the backend, teeing stdout and stderr to log files and the container's console
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
#!/bin/bash
|
||||
echo "Starting nginx..."
|
||||
LOG_DIR=${NETALERTX_APP}
|
||||
RUN_DIR=${SYSTEM_SERVICES_RUN}
|
||||
TMP_DIR=${SYSTEM_SERVICES_RUN_TMP}
|
||||
NGINX_CONFIG_FILE=${NGINX_CONFIG_FILE}
|
||||
|
||||
# Create directories if they don't exist
|
||||
mkdir -p "${LOG_DIR}" "${RUN_DIR}" "${TMP_DIR}"
|
||||
|
||||
# Execute nginx with overrides
|
||||
exec nginx \
|
||||
-p "${RUN_DIR}/" \
|
||||
-c "${NGINX_CONFIG_FILE}" \
|
||||
-g "daemon off;" >> "${LOG_APP_FRONT}" 2>&1
|
||||
-g "error_log ${LOG_DIR}/nginx.error.log; pid ${RUN_DIR}/nginx.pid; daemon off;"
|
||||
Reference in New Issue
Block a user