Apply CodeRabbit suggestions

This commit is contained in:
MrMeatikins
2026-02-22 22:20:28 -05:00
parent 32c21b01bb
commit 4316a436eb
4 changed files with 11 additions and 11 deletions

2
.env
View File

@@ -7,7 +7,7 @@ LOGS_LOCATION=/path/to/docker_logs
#ENVIRONMENT VARIABLES
TZ=Europe/Paris
PORT=20211
NETALERTX_PORT=20211
#DEVELOPMENT VARIABLES

View File

@@ -40,8 +40,8 @@ The container uses `network_mode: host` by default. This is **required** for cor
### Environment Variables
You can customize the application by editing the `environment` section in the compose file. Common overrides include:
* `TZ`: Timezone (mapped via `/etc/localtime`).
* `SCAN_SUBNETS`: Define specific subnets to scan if auto-detection fails (e.g., `192.168.1.0/24`).
* Timezone is controlled by the read-only `/etc/localtime` bind mount (do not use a `TZ` variable).
* `SCAN_SUBNETS`: Not present by default in the compose `environment` blocks. You must manually add it if you need to override subnet scanning (e.g., `192.168.1.0/24`).
For a full list of environment variables and configuration options, see the [Customize with Environment Variables](https://docs.netalertx.com/DOCKER_COMPOSE/?h=environmental+variables#customize-with-environmental-variables) section in the documentation.

View File

@@ -23,13 +23,13 @@ services:
target: /etc/localtime
read_only: true
tmpfs:
- "/tmp:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
- "/tmp:mode=1777,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
environment:
PUID: ${NETALERTX_UID:-20211}
PGID: ${NETALERTX_GID:-20211}
LISTEN_ADDR: ${LISTEN_ADDR:-0.0.0.0}
PORT: ${PORT:-20211}
GRAPHQL_PORT: ${GRAPHQL_PORT:-20212}
LISTEN_ADDR: ${NETALERTX_LISTEN_ADDR:-0.0.0.0}
PORT: ${NETALERTX_PORT:-20211}
GRAPHQL_PORT: ${NETALERTX_GRAPHQL_PORT:-20212}
mem_limit: 2048m
mem_reservation: 1024m
cpu_shares: 512

View File

@@ -23,13 +23,13 @@ services:
target: /etc/localtime
read_only: true
tmpfs:
- "/tmp:mode=1700,uid=0,gid=0,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
- "/tmp:mode=1777,rw,noexec,nosuid,nodev,async,noatime,nodiratime"
environment:
PUID: ${NETALERTX_UID:-20211}
PGID: ${NETALERTX_GID:-20211}
LISTEN_ADDR: ${LISTEN_ADDR:-0.0.0.0}
PORT: ${PORT:-20211}
GRAPHQL_PORT: ${GRAPHQL_PORT:-20212}
LISTEN_ADDR: ${NETALERTX_LISTEN_ADDR:-0.0.0.0}
PORT: ${NETALERTX_PORT:-20211}
GRAPHQL_PORT: ${NETALERTX_GRAPHQL_PORT:-20212}
mem_limit: 2048m
mem_reservation: 1024m
cpu_shares: 512