This commit is contained in:
2025-05-22 20:39:04 +02:00
parent 5d0209f7a4
commit d450994857
2 changed files with 18 additions and 2 deletions

View File

@@ -24,5 +24,9 @@ EXPOSE 5000
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
# Run the application with gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--chdir", "/app", "app:app"]
# Create a startup script
RUN echo '#!/bin/bash\npython init_db.py\ngunicorn --bind 0.0.0.0:5000 --chdir /app app:app' > /app/start.sh
RUN chmod +x /app/start.sh
# Run the startup script
CMD ["/app/start.sh"]