20 infrastructure horizontal scaling support #37
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the Docker deployment and configuration for LogWard, with a focus on enabling horizontal scaling, simplifying environment variable management, and supporting reverse proxy setups (such as Traefik). It adds new Docker Compose files for advanced deployment scenarios, updates documentation for clarity and best practices, and enhances backend code to support scalable, production-grade deployments.
Key changes include:
Docker Compose & Horizontal Scaling Enhancements:
docker/docker-compose.traefik.ymlfor advanced deployments with Traefik reverse proxy, enabling horizontal scaling, load balancing, and automatic service discovery. It includes configuration for scaling backend, worker, and frontend services, and sets up Traefik as a single entry point.docker/docker-compose.ymlto remove custom networks, simplify service definitions, and ensure compatibility with scaling and reverse proxy setups. Health checks are improved, and environment variable defaults are set for easier configuration. [1] [2] [3] [4] [5]docker/.env.exampleas a clear template for environment variables, separating required and optional settings, and providing guidance for production deployments and scaling.Backend & Frontend Configuration Improvements:
TRUST_PROXYenvironment variable (and config support) to enable correct client IP detection when running behind a reverse proxy, ensuring accurate rate limiting and logging. Backend code now uses this flag to trust proxy headers. [1] [2] [3]PUBLIC_API_URLis empty, it uses relative URLs, which is ideal for reverse proxy setups and simplifies multi-instance deployments. [1] [2]Documentation & Usability:
README.mdwith simplified setup instructions: users now download pre-made configuration files instead of writing their own, and are guided to edit.envfor secrets and settings. Documentation now clearly distinguishes between development and production setups, and links to horizontal scaling documentation. [1] [2].env.exampleand compose files to guide users through configuration, scaling, and best practices for secure and stable deployments. [1] [2] [3]These changes make LogWard easier to deploy in both single-instance and production-scale environments, improve security and reliability, and provide clear guidance for new users and advanced operators alike.