mirror of
https://github.com/SirBlobby/Hoya26.git
synced 2026-02-04 03:34:34 -05:00
Restore code and save recent updates
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
# Use a lightweight Python image
|
||||
|
||||
FROM python:3.9-slim
|
||||
|
||||
# Set working directory inside the container
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy requirements first (for better caching)
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install dependencies
|
||||
# 'gunicorn' must be in your requirements.txt or installed here
|
||||
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN pip install gunicorn
|
||||
|
||||
# Copy the rest of the application
|
||||
|
||||
COPY . .
|
||||
|
||||
# Expose the internal port (Gunicorn default is 8000, or we choose one)
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
# Command to run production server
|
||||
# -w 4: 4 worker processes
|
||||
# -b 0.0.0.0:5000: Bind to all interfaces inside container on port 5000
|
||||
|
||||
|
||||
|
||||
CMD ["gunicorn", "--workers", "4", "--bind", "0.0.0.0:5000", "app:app"]
|
||||
|
||||
Reference in New Issue
Block a user