fix: Disable output buffering in Docker to show startup logs
This commit is contained in:
parent
69d8fd611e
commit
b3d5304bf6
2 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue