Fix inventory service DATABASE_HOST env var in docker-compose.prod.yml#3
Closed
Copilot wants to merge 2 commits into
Closed
Fix inventory service DATABASE_HOST env var in docker-compose.prod.yml#3Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…od.yml Co-authored-by: valerubio7 <129685751+valerubio7@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix saga transaction issues with production docker compose
Fix inventory service DATABASE_HOST env var in docker-compose.prod.yml
Nov 26, 2025
Collaborator
|
@copilot podes probar ahora el endpoint de transaction |
Author
No puedo ejecutar Docker en este entorno sandbox debido a restricciones de red (no se pueden descargar paquetes de Alpine). Sin embargo, el fix está correcto: cambié |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Saga transaction endpoint
/saga/transactionfails in production but works in development. The inventory service cannot connect to PostgreSQL in production due to misconfigured environment variables.Root Cause
docker-compose.prod.ymlpassesPOSTGRES_HOSTto the inventory service, butinventory/config/settings.pyreads fromDATABASE_HOST:Changes
docker-compose.prod.ymlinventory service environment:POSTGRES_HOST→DATABASE_HOSTPOSTGRES_PORT→DATABASE_PORTThis aligns production with development (
docker-compose.yml) which correctly usesDATABASE_HOST.Original prompt
Cuando ejecuto el endpoint saga/transaction con el docker compose de desarrollo funciona perfectamente sin modificar nada del codigo pero con el docker compose de prod no funciona
[Chronological Review: The conversation began with the user asking about the data sent by each endpoint of the microservices. The user then inquired about where to change the success or failure probability in transactions. Following that, the user requested to test the saga transaction to see if it succeeds. The user also asked to try using the production Docker Compose. The conversation continued with the user expressing issues with the production Docker Compose not executing the saga transaction successfully, while it worked fine with the development Docker Compose without code modifications. The user reiterated the problem with the production setup not functioning as expected.][Intent Mapping:
[Technical Inventory:
[Code Archaeology:
[Progress Assessment:
[Context Validation: All critical information regarding the user's inquiries about microservices, transaction management, and Docker Compose setups is captured.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: - "que datos envia cada endpoint de cada microserviicio??" - Understanding endpoint data. - "en que partes del codigo puedo cambiar la probabilidad de exito o fallo en las transacciones" - Modifying transaction probabilities. - "prueba la transaccion saga para ver si tiene exito" - Testing saga transaction. - "podrias probar usando el docker compose de prod" - Testing with production Docker Compose. - "con el docker compose normal yo podia ejecutar /saga/transaction sin problema y sin modificar el codigo la transaccion era exitosa. porque con el de produccion no pasa lo mismo?" - Investigating production issues. - "Cuando ejecuto el endpoint saga/transaction con el docker compose de desarrollo funciona perfectamente sin modificar nada del codigo pero con el docker compose de prod no funciona" - Reiterating production issues.-
-
- Technical Foundation:
- Microservices Architecture: Used for the ecommerce application.
- Docker: Employed for containerization.
- Docker Compose: Used for orchestrating multi-container applications.
- Codebase Status:
- File Name 1: Dockerfile (various locations)
- Purpose: Container configuration for micro...
Session Context: The conversation has revolved around understanding microservices, transaction management, and the differences between development and production environments.
User Intent Evolution: The user initially sought information about endpoints and transaction management but shifted focus to troubleshooting issues with the production environment.
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.