final app for testing and deployment
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user