Сделана лаба 4
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
FROM python:3.13-slim-bookworm
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN python -m pip install --no-cache-dir -r requirements.txt
|
||||
COPY app.py ./
|
||||
COPY migrations ./migrations/
|
||||
COPY scripts ./scripts/
|
||||
|
||||
RUN useradd --create-home --shell /usr/sbin/nologin appuser && \
|
||||
chown -R appuser:appuser /app
|
||||
USER appuser
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["python", "app.py"]
|
||||
Reference in New Issue
Block a user