-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5bf36b6
commit b0e5710
Showing
4 changed files
with
31 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
FROM python:3.10 | ||
ARG PYTHON_BASE=3.10-slim | ||
|
||
FROM python:$PYTHON_BASE as builder | ||
|
||
MAINTAINER Sebastian Moßburger <sebastian-markgraf@t-online.de> | ||
|
||
WORKDIR /backend | ||
COPY pyproject.toml . | ||
RUN pip install pdm | ||
RUN pdm install | ||
# Copy project | ||
COPY . . | ||
|
||
|
||
# Run uvicorn | ||
CMD ["pdm", "run", "uvicorn", "--host", "0.0.0.0", "src.backend:app", "--port", "42069"] | ||
RUN pip install -U pdm | ||
|
||
COPY pyproject.toml pdm.lock README.md src/ . | ||
# Required for PDM install of package | ||
RUN pdm install --check --prod --no-editable | ||
|
||
|
||
FROM python:$PYTHON_BASE | ||
|
||
COPY --from=builder /backend/.venv/ /backend/.venv/ | ||
ENV PATH="/backend/.venv/bin:$PATH" | ||
|
||
COPY src/ /backend/src/ | ||
|
||
CMD ["fastapi", "run", "/backend/src/whatsapp_transcribe/__main__.py", "--port", "80"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters