forked from mtusi2026/mtusi2026lab2
feat: complete lab2 with postgres, auth, migrations, and persistence
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# ДОБАВЛЯЕМ curl В СПИСОК УСТАНАВЛИВАЕМЫХ ПАКЕТОВ
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
make \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN groupadd -r appgroup && useradd -r -g appgroup appuser
|
||||
|
||||
COPY requirements.txt requirements-dev.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt
|
||||
|
||||
COPY src/ ./src/
|
||||
COPY tests/ ./tests/
|
||||
COPY scripts/ ./scripts/
|
||||
COPY contracts/ ./contracts/
|
||||
COPY Makefile lab.json ./
|
||||
|
||||
RUN chown -R appuser:appgroup /app
|
||||
|
||||
USER appuser
|
||||
|
||||
# Exec-форма для корректного получения SIGTERM
|
||||
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
Reference in New Issue
Block a user