wip
This commit is contained in:
parent
2ad04860a3
commit
f7f28b35ec
5 changed files with 33 additions and 6 deletions
10
Dockerfile
10
Dockerfile
|
@ -19,6 +19,10 @@ RUN pip install --upgrade pip && \
|
|||
# Copy the rest of the application
|
||||
COPY . .
|
||||
|
||||
# Create the instance directory for SQLite
|
||||
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
|
||||
|
@ -27,7 +31,9 @@ USER appuser
|
|||
|
||||
# Set environment variables
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1
|
||||
PYTHONUNBUFFERED=1 \
|
||||
SECRET_KEY="" \
|
||||
FLASK_APP=wsgi.py
|
||||
|
||||
# Run gunicorn
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "4", "wsgi:app"]
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--timeout", "120", "--workers", "4", "wsgi:app"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue