forked from mtusi2026/mtusi2026lab2
18 lines
401 B
Docker
18 lines
401 B
Docker
FROM python:3.12.8-slim-bookworm
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
APP_HOST=0.0.0.0 \
|
|
APP_PORT=8080
|
|
|
|
WORKDIR /app
|
|
COPY requirements.txt /app/requirements.txt
|
|
RUN pip install --no-cache-dir -r requirements.txt \
|
|
&& adduser --disabled-password --gecos "" app
|
|
COPY app.py /app/app.py
|
|
COPY migrations /app/migrations
|
|
USER app
|
|
|
|
EXPOSE 8080
|
|
CMD ["python", "/app/app.py"]
|