Skip to content

Conversation

@adamoutler
Copy link
Collaborator

@adamoutler adamoutler commented Nov 17, 2025

Clarified the preferred volume layout for NetAlertX and explained the bind mount alternative. Address issue #1292

Summary by CodeRabbit

  • Documentation
    • Updated Docker Compose guidance to recommend a single named volume for simplified setup.
    • Added backward-compatible two-volume layout option for existing deployments.
    • Included new bind-mount instructions and step-by-step migration examples.

Clarified the preferred volume layout for NetAlertX and explained the bind mount alternative.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 17, 2025

Walkthrough

The Docker Compose documentation has been updated to recommend a single named volume (netalertx_data) mounted at /data instead of separate volumes for configuration and database. Backward-compatible legacy options and bind-mount guidance are introduced, with new migration steps and YAML examples provided.

Changes

Cohort / File(s) Summary
Docker Compose Volume Documentation
docs/DOCKER_COMPOSE.md
Updates volume mounting guidance to favor single named volume layout; introduces legacy two-volume option; adds bind-mount documentation; includes step-by-step migration instructions with concrete before/after YAML snippets

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify documentation accuracy and clarity of new volume setup guidance
  • Confirm migration steps and YAML examples are syntactically correct
  • Check that legacy/backward-compatible options are accurately represented

Possibly related PRs

  • PR #1121: Modifies docker-compose volume mount examples, addressing volume-related configuration in container setup
  • PR #1155: Updates docs/DOCKER_COMPOSE.md with alternative volume layout examples using separate config/db mounts

Poem

🐰 One volume now, so clean and neat,
No config and database split,
The data folder is complete,
With migration steps that fit,
NetAlertX storage, no more split! 📦

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: updating Docker Compose documentation to clarify volume usage (moving from multiple named volumes to a single volume approach with bind-mount alternatives).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7b9fda and 4ccac66.

📒 Files selected for processing (1)
  • docs/DOCKER_COMPOSE.md (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-09-20T03:01:19.912Z
Learnt from: adamoutler
Repo: jokob-sk/NetAlertX PR: 1184
File: .devcontainer/Dockerfile:18-19
Timestamp: 2025-09-20T03:01:19.912Z
Learning: In the NetAlertX repository, .devcontainer/Dockerfile is auto-generated and should not be reviewed directly. Review comments about dependencies and build steps should be directed at the root Dockerfile where the actual source commands are located.

Applied to files:

  • docs/DOCKER_COMPOSE.md
📚 Learning: 2025-09-20T02:56:24.501Z
Learnt from: adamoutler
Repo: jokob-sk/NetAlertX PR: 1184
File: .devcontainer/devcontainer.json:5-8
Timestamp: 2025-09-20T02:56:24.501Z
Learning: In the NetAlertX devcontainer setup, the final .devcontainer/Dockerfile is generated by combining the root Dockerfile with .devcontainer/resources/devcontainer-Dockerfile using the generate-dockerfile.sh script. The devcontainer.json should reference the generated file, not the root Dockerfile.

Applied to files:

  • docs/DOCKER_COMPOSE.md
📚 Learning: 2025-09-20T14:09:29.159Z
Learnt from: adamoutler
Repo: jokob-sk/NetAlertX PR: 1184
File: .devcontainer/scripts/setup.sh:103-116
Timestamp: 2025-09-20T14:09:29.159Z
Learning: In NetAlertX devcontainer setup, the netalertx user has write permissions to /var/log/nginx/ directory as it's explicitly chowned to netalertx:www-data in the Dockerfile, so setup.sh can write to nginx log files without sudo.

Applied to files:

  • docs/DOCKER_COMPOSE.md
📚 Learning: 2025-10-19T01:40:57.095Z
Learnt from: adamoutler
Repo: jokob-sk/NetAlertX PR: 1230
File: .devcontainer/resources/devcontainer-overlay/services/config/nginx/netalertx.conf.template:1-2
Timestamp: 2025-10-19T01:40:57.095Z
Learning: In the NetAlertX repository, .devcontainer/resources/devcontainer-overlay/services/config/nginx/netalertx.conf.template is an auto-generated file that is intentionally committed to source control. It cannot be regenerated automatically outside the devcontainer environment and is required for the devcontainer to start, creating a bootstrap dependency.

Applied to files:

  • docs/DOCKER_COMPOSE.md
📚 Learning: 2025-10-26T17:09:18.621Z
Learnt from: adamoutler
Repo: jokob-sk/NetAlertX PR: 1235
File: .devcontainer/scripts/setup.sh:146-148
Timestamp: 2025-10-26T17:09:18.621Z
Learning: In `.devcontainer/scripts/setup.sh` and other devcontainer setup scripts for NetAlertX, chmod 666 on /var/run/docker.sock is acceptable because devcontainer environments are single-user development contexts where convenience can take priority over strict permission hardening.

Applied to files:

  • docs/DOCKER_COMPOSE.md
📚 Learning: 2025-09-20T14:08:44.152Z
Learnt from: adamoutler
Repo: jokob-sk/NetAlertX PR: 1184
File: .devcontainer/Dockerfile:82-92
Timestamp: 2025-09-20T14:08:44.152Z
Learning: In devcontainer builds, source repository files are not available during the Docker build phase. The source code gets mounted into the container after it's built and started, so COPY commands referencing source files will fail. Configuration files need to be handled at runtime (e.g., in setup scripts) rather than during the build stage.

Applied to files:

  • docs/DOCKER_COMPOSE.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: docker_dev

Comment @coderabbitai help to get the list of available commands and usage tips.

@jokob-sk jokob-sk merged commit 85c9b0b into netalertx:main Nov 18, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants