update dockerfile

main
3wish 2024-04-15 16:34:40 +08:00
parent 166d71272d
commit b87e6f5ef6
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ ENV POSTGRES_HOST=together-postgres
ENV POSTGRES_USER=together ENV POSTGRES_USER=together
ENV POSTGRES_PASSWORD=togetherno.1 ENV POSTGRES_PASSWORD=togetherno.1
COPY ./requirements.txt . COPY ./requirements.txt .
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt -i https://mirrors.aliyun.com/pypi/simple RUN pip install --no-cache-dir --upgrade -r /backend/requirements.txt -i https://mirrors.aliyun.com/pypi/simple
COPY . . COPY . .
EXPOSE 8000 EXPOSE 8000
CMD ["sh", "-c", "alembic upgrade head && uvicorn src.main:app --host 0.0.0.0 --port 8000 --env-file ./.dev.env"] CMD ["sh", "-c", "alembic upgrade head && uvicorn src.main:app --host 0.0.0.0 --port 8000 --env-file ./.dev.env"]

View File

@ -4,7 +4,7 @@ ENV POSTGRES_HOST=together-postgres
ENV POSTGRES_USER=together ENV POSTGRES_USER=together
ENV POSTGRES_PASSWORD=togetherno.1 ENV POSTGRES_PASSWORD=togetherno.1
COPY ./requirements.txt . COPY ./requirements.txt .
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt -i https://mirrors.aliyun.com/pypi/simple RUN pip install --no-cache-dir --upgrade -r /backend/requirements.txt -i https://mirrors.aliyun.com/pypi/simple
COPY . . COPY . .
EXPOSE 8000 EXPOSE 8000
CMD ["sh", "-c", "alembic upgrade head && uvicorn src.main:app --host 0.0.0.0 --port 8000 --env-file ./.prod.env"] CMD ["sh", "-c", "alembic upgrade head && uvicorn src.main:app --host 0.0.0.0 --port 8000 --env-file ./.prod.env"]