add logs to backend dockerfile

This commit is contained in:
david 2026-03-15 18:24:34 +03:00
parent 0e714b8ca1
commit bd862c7735
2 changed files with 6 additions and 2 deletions

View file

@ -78,7 +78,7 @@ class CardPositionService:
for index, card in enumerate(dest_cards):
if card is None:
# This is where our moved card should go
moved_card = Card.query.get(moved_card_id)
moved_card = db.session.get(Card, moved_card_id)
if moved_card:
moved_card.pos = float(index)
else:

View file

@ -43,4 +43,8 @@ EXPOSE 8000
# Run with Gunicorn (Production WSGI Server)
# --bind 0.0.0.0 makes it accessible outside the container
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "wsgi:app"]
# --access-logfile - sends access logs to stdout
# --error-logfile - sends error logs to stderr
# --capture-output ensures all output is captured
# --log-level info sets the logging level
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "--access-logfile", "-", "--error-logfile", "-", "--capture-output", "--log-level", "info", "wsgi:app"]