FROM python:3.9.2-slim EXPOSE 8000 WORKDIR /app COPY poetry.lock pyproject.toml ./ RUN pip install poetry==1.1 && \ poetry config virtualenvs.in-project true && \ poetry install --no-dev COPY . ./ CMD poetry run alembic upgrade head && \ poetry run uvicorn --host=0.0.0.0 app.main:app