Enhance Docker Deployment: Logging Resilience and Named Log Volume - #116
Enhance Docker Deployment: Logging Resilience and Named Log Volume#116TCMAD wants to merge 3 commits into
Conversation
- This commit updates the `AGENTS.md` file to include notes on its compatibility and relevance for AI agents interacting with the project. - The `AGENTS.md` file serves as a central reference for AI agents, detailing project setup, development commands, and repository structure. This information is crucial for ensuring agents can operate efficiently and correctly within the project's ecosystem.
If file executed as `.env` with parameter empty, it will be sended as a string when the program need a int. It will return an error to deploy the backend container.
- This commit addresses issues with Docker deployment by enhancing logging resilience and switching to a named volume for log storage. - Logging Resilience: The backend application's logging configuration (`backend/app/core/logging_config.py`) is updated to fall back to console-only logging if file logging fails due to unwritable directories. This prevents application startup failures. - Named Log Volume: The `docker-compose.yml` now uses a named volume (`logs`) for log storage instead of a host bind mount (`./logs`). This resolves potential file ownership conflicts and ensures smoother deployments.
|
Thanks for this — the console-fallback resilience is a good idea. A few things to address before merge: 1. Dropping
|
This update addresses critical Docker deployment issues by improving logging resilience and refining log volume management. Changes fix local deployment of the
backendcontainer, blocked bylogs/non-root ownership and the template.env.docker.examplefile not properly set with an optional parameter.Key Changes:
Logging Resilience:
/app/logsdirectories). This prevents application startup failures caused by logging configuration issues.docker compose logs <service_name>(e.g.,docker compose logs backend).Log Volume Management:
docker-compose.ymlhas been updated to use a named Docker volume (logs) for log storage, replacing the host bind mount (./logs).Impact on Deployment Issues:
Small Changes:
Environment Variable Configuration: As highlighted in the
README.mdand.env.docker.example, proper environment variable setup is key to successful deployment. TheTELEGRAM_API_IDin.env.docker.examplewas a string (' ') but is expected to be an integer. The user cannot deploy with this parameter set with nothing like the othersAgent guide portability: Copy and update
CLAUDE.mdinto a new fileAGENTS.mdto introduce guidelines for multiples agents (Codex, Gemini CLI, etc.)