addressbook_web/Dockerfile

13 lines
384 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
COPY templates/ ./templates/
# Экспонируем оба порта
EXPOSE 8001 8002
# Запускаем два процесса uvicorn
CMD ["sh", "-c", "uvicorn app:web_app --host 0.0.0.0 --port 8001 & uvicorn app:api_app --host 0.0.0.0 --port 8002"]