Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install monitor into separate venv #32

Merged
merged 2 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ COPY pyproject.toml /usr/local/ocrd-monitor/
COPY noxfile.py /usr/local/ocrd-monitor/
COPY tests /usr/local/ocrd-monitor/tests

RUN pip install -e /usr/local/ocrd-monitor
RUN curl -sSL https://pdm.fming.dev/install-pdm.py | python3 -
ENV PATH="/root/.local/bin:${PATH}"

WORKDIR /usr/local/ocrd-monitor
RUN pdm install

WORKDIR /
CMD ["/init.sh", "/data"]
2 changes: 1 addition & 1 deletion init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ export OCRD_CONTROLLER__USER=admin
export OCRD_CONTROLLER__KEYFILE=~/.ssh/id_rsa

cd /usr/local/ocrd-monitor
uvicorn --host 0.0.0.0 --port 5000 "ocrdmonitor.main:app"
pdm run monitor
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ markers = [
[tool.pdm.scripts]
test = "pytest tests -m 'not integration'"
test-integration = "pytest tests"
monitor = "uvicorn --host 0.0.0.0 --port 5000 'ocrdmonitor.main:app'"

[[tool.mypy.overrides]]
module = ["testcontainers.*", "motor.motor_asyncio"]
Expand Down