mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-03 08:41:35 -07:00
coderabbit changes
This commit is contained in:
@@ -28,6 +28,32 @@ services:
|
||||
APP_CONF_OVERRIDE: ${GRAPHQL_PORT:-20212}
|
||||
ALWAYS_FRESH_INSTALL: ${ALWAYS_FRESH_INSTALL:-false}
|
||||
NETALERTX_DEBUG: ${NETALERTX_DEBUG:-0}
|
||||
# Environment variable: NETALERTX_CHECK_ONLY
|
||||
#
|
||||
# Purpose: Enables check-only mode for container startup diagnostics and capability testing.
|
||||
#
|
||||
# When set to 1 (enabled):
|
||||
# - Container runs all startup checks and prints diagnostic information
|
||||
# - Services are NOT started (container exits after checks complete)
|
||||
# - Useful for testing configurations, auditing capabilities, or troubleshooting
|
||||
#
|
||||
# When set to 0 (disabled):
|
||||
# - Normal operation: container starts all services after passing checks
|
||||
#
|
||||
# Default: 1 in this compose file (check-only mode for testing)
|
||||
# Production default: 0 (full startup)
|
||||
#
|
||||
# Automatic behavior:
|
||||
# - May be automatically set by root-entrypoint.sh when privilege drop fails
|
||||
# - Triggers immediate exit path in entrypoint.sh after diagnostic output
|
||||
#
|
||||
# Usage examples:
|
||||
# NETALERTX_CHECK_ONLY: 0 # Normal startup with services
|
||||
# NETALERTX_CHECK_ONLY: 1 # Check-only mode (exits after diagnostics)
|
||||
#
|
||||
# Troubleshooting:
|
||||
# If container exits immediately after startup checks, verify this variable is set to 0
|
||||
# for production deployments. Check container logs for diagnostic output from startup checks.
|
||||
NETALERTX_CHECK_ONLY: ${NETALERTX_CHECK_ONLY:-1}
|
||||
|
||||
mem_limit: 2048m
|
||||
|
||||
@@ -14,6 +14,8 @@ services:
|
||||
cap_add:
|
||||
- SETUID
|
||||
- SETGID
|
||||
- NET_RAW
|
||||
- NET_ADMIN
|
||||
# Intentionally drop CHOWN to prove failure path while leaving defaults intact
|
||||
environment:
|
||||
LISTEN_ADDR: 0.0.0.0
|
||||
|
||||
@@ -31,11 +31,11 @@ services:
|
||||
target: /data/config
|
||||
read_only: false
|
||||
tmpfs:
|
||||
- "/data/db:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/api:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/log:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/run:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/nginx/active-config:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/data/db:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/api:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/log:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/run:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/nginx/active-config:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
volumes:
|
||||
netalertx_config:
|
||||
netalertx_db:
|
||||
|
||||
@@ -35,10 +35,10 @@ services:
|
||||
target: /data/config
|
||||
read_only: false
|
||||
tmpfs:
|
||||
- "/tmp/api:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/log:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/run:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/nginx/active-config:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/api:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/log:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/run:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/nginx/active-config:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
volumes:
|
||||
netalertx_config:
|
||||
test_netalertx_db:
|
||||
@@ -39,9 +39,9 @@ services:
|
||||
target: /tmp/log
|
||||
read_only: false
|
||||
tmpfs:
|
||||
- "/tmp/api:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/run:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/nginx/active-config:mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/api:mode=1700,uid=20211,gid=20211,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/run:mode=1700,uid=20211,gid=20211,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
- "/tmp/nginx/active-config:mode=1700,uid=20211,gid=20211,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
|
||||
volumes:
|
||||
netalertx_config:
|
||||
netalertx_db:
|
||||
|
||||
Reference in New Issue
Block a user