moved to server
Update readme.md Signed-off-by: rasmus <rsbendtsen@gmail.com> Update readme.md Update Dockerfile Update Dockerfile
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
Reference in New Issue
Block a user