together_backend/.dev.Dockerfile

10 lines
401 B
Plaintext
Raw Normal View History

2024-04-11 17:38:13 +08:00
FROM python:3
WORKDIR /backend
2024-04-11 17:38:13 +08:00
ENV POSTGRES_HOST=together-postgres
ENV POSTGRES_USER=together
ENV POSTGRES_PASSWORD=togetherno.1
COPY ./requirements.txt .
2024-04-15 16:34:40 +08:00
RUN pip install --no-cache-dir --upgrade -r /backend/requirements.txt -i https://mirrors.aliyun.com/pypi/simple
2024-04-11 17:38:13 +08:00
COPY . .
EXPOSE 8000
CMD ["sh", "-c", "alembic upgrade head && uvicorn src.main:app --host 0.0.0.0 --port 8000 --env-file ./.dev.env"]