Skip to content

Commit 0b7c87a

Browse files
committed
fix: docker image entrypoint
1 parent a41aa20 commit 0b7c87a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ FROM python:$PYTHON_BASE AS builder
44
# install PDM
55
RUN pip install -U pdm
66
ENV PDM_CHECK_UPDATE=false
7-
COPY pyproject.toml pdm.lock README.md /project/
8-
COPY tg_searcher /project/tg_searcher
7+
COPY pyproject.toml pdm.lock README.md /app/
8+
COPY tg_searcher /app/tg_searcher
99

1010
# install dependencies and project into the local packages directory
11-
WORKDIR /project
11+
WORKDIR /app
1212
RUN pdm install --check --prod --no-editable
1313

1414
# run stage
1515
FROM python:$PYTHON_BASE
1616

1717
# retrieve packages from build stage
18-
COPY --from=builder /project/.venv/ /project/.venv
19-
ENV PATH="/project/.venv/bin:$PATH"
20-
COPY tg_searcher /project/tg_searcher
21-
WORKDIR /project
22-
CMD ["python", "tg_searcher/__main__.py"]
18+
COPY --from=builder /app/.venv/ /app/.venv
19+
ENV PATH="/app/.venv/bin:$PATH"
20+
COPY tg_searcher /app/tg_searcher
21+
WORKDIR /app
22+
ENTRYPOINT ["python", "tg_searcher/__main__.py"]
23+
CMD ["-f", "./config/searcher.yaml"]
2324

0 commit comments

Comments
 (0)