forked from mtusi2026/mtusi2026lab3
lab3: Compose+Nginx, две API-реплики и идемпотентность
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
FROM python:3.12.8-slim-bookworm
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY migrations/ ./migrations/
|
||||
COPY src/ ./src/
|
||||
COPY scripts/migrate.py ./scripts/migrate.py
|
||||
|
||||
ENV PYTHONPATH=/app/src
|
||||
ENV APP_HOST=0.0.0.0
|
||||
ENV APP_PORT=8080
|
||||
ENV APP_ENV=lab
|
||||
ENV SESSION_TTL_SECONDS=3600
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["sh", "-c", "exec uvicorn messenger.app:app --host ${APP_HOST} --port ${APP_PORT}"]
|
||||
Reference in New Issue
Block a user