This commit is contained in:
pika 2025-04-03 13:51:52 +02:00
parent 78ce15e82d
commit 0a31714a93
10 changed files with 159 additions and 149 deletions

View file

@ -20,20 +20,19 @@ RUN pip install --upgrade pip && \
COPY . .
# Create the instance directory for SQLite
RUN mkdir -p instance && \
chmod 777 instance
# RUN mkdir -p instance && \
# chmod 777 instance
# Create a non-root user to run the app
RUN useradd -m appuser && \
chown -R appuser:appuser /app
# RUN useradd -m appuser && \
# chown -R appuser:appuser /app
USER appuser
# USER appuser
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
SECRET_KEY="" \
FLASK_APP=wsgi.py
# Run gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--timeout", "120", "--workers", "4", "wsgi:app"]
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--timeout", "120", "--workers", "4", "run:app"]