final app for testing and deployment

This commit is contained in:
2025-07-16 20:45:12 +03:00
parent 729f64f411
commit e9a8f5e622
26 changed files with 1561 additions and 168 deletions

View File

@@ -23,10 +23,11 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY main.py .
COPY gunicorn.conf.py .
COPY app/ ./app/
# Create necessary directories
RUN mkdir -p app/static/qr_codes app/static/logos flask_session
RUN mkdir -p app/static/qr_codes app/static/logos flask_session data
# Set environment variables
ENV FLASK_APP=main.py
@@ -45,5 +46,5 @@ EXPOSE 5000
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import requests; requests.get('http://localhost:5000/health')" || exit 1
# Run the application
CMD ["python", "main.py"]
# Run the application with Gunicorn for production
CMD ["gunicorn", "-c", "gunicorn.conf.py", "main:app"]