forked from mtusi2026/mtusi2026lab2
17 lines
470 B
Docker
17 lines
470 B
Docker
FROM python:3.11-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
APP_HOST=0.0.0.0 \
|
|
APP_PORT=8080 \
|
|
DATABASE_URL=postgresql://messenger:messenger@db:5432/messenger \
|
|
SESSION_TTL_SECONDS=3600
|
|
|
|
WORKDIR /app
|
|
COPY requirements.txt /app/requirements.txt
|
|
RUN pip install --no-cache-dir -r /app/requirements.txt
|
|
COPY app.py /app/app.py
|
|
COPY migrations /app/migrations
|
|
EXPOSE 8080
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]
|