Update readme.md Signed-off-by: rasmus <rsbendtsen@gmail.com> Update readme.md Update Dockerfile Update Dockerfile
21 lines
480 B
Docker
21 lines
480 B
Docker
FROM python:3.11-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 5000
|
|
|
|
# Initialize DB, then start Gunicorn
|
|
CMD python -c "from app import app, db; app.app_context().push(); db.create_all()" && \
|
|
gunicorn --bind 0.0.0.0:5000 app:app |