fix: Disable output buffering in Docker to show startup logs
Some checks failed
Lint and Build / Lint (push) Failing after 5s
Lint and Build / Build (push) Has been skipped
Lint and Build / Docker Build (push) Has been skipped

This commit is contained in:
goose 2026-02-20 16:57:13 -03:00
parent 69d8fd611e
commit b3d5304bf6
2 changed files with 6 additions and 2 deletions

View file

@ -18,6 +18,8 @@ services:
- MONGODB_URI=mongodb://mongodb:27017 - MONGODB_URI=mongodb://mongodb:27017
- MONGODB_DATABASE=normogen_dev - MONGODB_DATABASE=normogen_dev
- JWT_SECRET=dev-jwt-secret-key-minimum-32-chars - JWT_SECRET=dev-jwt-secret-key-minimum-32-chars
# Disable stdout/stderr buffering
- RUST_LOG_STYLE=always
depends_on: depends_on:
mongodb: mongodb:
condition: service_healthy condition: service_healthy

View file

@ -25,5 +25,7 @@ COPY src ./src
# Expose port # Expose port
EXPOSE 8000 EXPOSE 8000
# Run the application # Run the application with unbuffered output
CMD ["cargo", "run"] # PYTHONUNBUFFERED=1 and stdio -u flag for Python compatibility
# RUST_BACKTRACE=1 for better error messages
CMD ["sh", "-c", "RUST_BACKTRACE=1 cargo run"]