Files
NetAlertX/test/docker_tests/configurations/mount-tests/docker-compose.mount-test.db_unwritable.yml
2026-01-03 22:15:19 +00:00

44 lines
1.5 KiB
YAML

# Expected outcome: Container fails to start due to unwritable database partition
# - NETALERTX_DB shows as mounted but unwritable (❌ in Writeable column)
# - 30-writable-config.sh detects permission error and exits with code 1
# - Container startup fails because database files cannot be written to
services:
netalertx:
network_mode: host
build:
context: ../../../
dockerfile: Dockerfile
image: netalertx-test
container_name: netalertx-test-mount-db_unwritable
cap_drop:
- ALL
cap_add:
- CHOWN
- NET_ADMIN
- NET_RAW
- NET_BIND_SERVICE
environment:
LISTEN_ADDR: 0.0.0.0
PORT: 9999 # Use non-default port to test all paths
APP_CONF_OVERRIDE: 20212
ALWAYS_FRESH_INSTALL: true
NETALERTX_DEBUG: 0
NETALERTX_DB: /data/db
volumes:
- type: volume
source: test_netalertx_db
target: /data/db
read_only: true
- type: volume
source: netalertx_config
target: /data/config
read_only: false
tmpfs:
- "/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: