Dockerify
Some checks failed
Ik ben Henk python api ftp deploy / Deploy Python api (push) Has been cancelled
Some checks failed
Ik ben Henk python api ftp deploy / Deploy Python api (push) Has been cancelled
This commit is contained in:
23
Dockerfile
23
Dockerfile
@@ -0,0 +1,23 @@
|
|||||||
|
# Dockerfile
|
||||||
|
FROM python:3.11-slim
|
||||||
|
|
||||||
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||||
|
PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# (optioneel: system deps toevoegen als later nodig voor DB/libs)
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Python deps
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# App code
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
# Simpel: zelfde als startup.bat, maar dan Linux
|
||||||
|
CMD ["python", "app.py"]
|
||||||
|
|||||||
Reference in New Issue
Block a user