Skip to content

Conversation

@azeddine-hmd
Copy link

This PR introduces a custom Nginx startup script that ensures Wazuh upstream nodes are reachable before Nginx begins serving traffic.
The change improves reliability during multi-node deployments, avoiding potential startup race conditions between Nginx and Wazuh services.

Changes

Added nginx-entrypoint-check.sh script:
Waits for connectivity to:
wazuh-master:1514
wazuh-worker:1514
Starts Nginx only after both are reachable.
Updated multi-node/docker-compose.yml:
Mounted the script into the Nginx container.
Added runtime installation of netcat-openbsd (required for network checks).
Adjusted container command to execute the custom entrypoint.

Future Improvements

I can move the netcat-openbsd installation to a build-time step in a custom Nginx image for faster and more deterministic startup. Additionally, replacing apt update at runtime with a prebuilt image for production use.

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.

1 participant