switch to gunicorn
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -1,19 +1,14 @@
|
|||||||
# Dockerfile for 'Are We Buried?'
|
|
||||||
FROM python:3.12-slim
|
FROM python:3.12-slim
|
||||||
|
|
||||||
# Set environment
|
|
||||||
ENV PYTHONUNBUFFERED=1
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install dependencies
|
COPY requirements.txt .
|
||||||
COPY requirements.txt ./
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy application code
|
COPY app.py .
|
||||||
COPY . /app
|
COPY templates ./templates
|
||||||
|
COPY static ./static
|
||||||
|
|
||||||
# Expose the Flask port
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
# Run the Flask app
|
CMD ["gunicorn", "-b", "0.0.0.0:5000", "app:app"]
|
||||||
CMD ["python", "app.py"]
|
|
||||||
2
app.py
2
app.py
@@ -189,4 +189,4 @@ def snowfall_api():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(debug=True)
|
app.run(host="0.0.0.0", port=5000)
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
flask
|
flask
|
||||||
requests
|
requests
|
||||||
|
gunicorn
|
||||||
Reference in New Issue
Block a user