Skip to content
This repository was archived by the owner on Oct 30, 2026. It is now read-only.
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
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ group "default" {
}

target "_base" {
dockerfile = "src/mock_vws/_flask_server/Dockerfile"
dockerfile = "server/Dockerfile"
platforms = ["linux/amd64", "linux/arm64"]
}

Expand Down
14 changes: 7 additions & 7 deletions docs/source/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ Run each readiness probe until it exits successfully:

.. code-block:: console

$ container exec vuforia-target-manager-mock python /app/src/mock_vws/_flask_server/healthcheck.py
$ container exec vuforia-vws-mock python /app/src/mock_vws/_flask_server/healthcheck.py
$ container exec vuforia-vwq-mock python /app/src/mock_vws/_flask_server/healthcheck.py
$ container exec vuforia-target-manager-mock python -m vws_mock_server.healthcheck
$ container exec vuforia-vws-mock python -m vws_mock_server.healthcheck
$ container exec vuforia-vwq-mock python -m vws_mock_server.healthcheck

To stop and remove this deployment:

Expand All @@ -134,7 +134,7 @@ To mimic this functionality, this mock provides a target manager container which

To add a database, make a request to the following endpoint against the target manager container:

.. autoflask:: mock_vws._flask_server.target_manager:TARGET_MANAGER_FLASK_APP
.. autoflask:: vws_mock_server.target_manager:TARGET_MANAGER_FLASK_APP
:endpoints: create_cloud_database

For example, with either deployment above, use ``curl``:
Expand Down Expand Up @@ -170,7 +170,7 @@ Deleting a database

To delete a database use the following endpoint:

.. autoflask:: mock_vws._flask_server.target_manager:TARGET_MANAGER_FLASK_APP
.. autoflask:: vws_mock_server.target_manager:TARGET_MANAGER_FLASK_APP
:endpoints: delete_cloud_database

Setting the recognition counts of a target
Expand All @@ -179,7 +179,7 @@ Setting the recognition counts of a target
The mock does not count recognitions, because the counts which the real Vuforia Web Services report lag behind its queries by longer than a test runs.
To make the target summary report and the reco counts report show non-zero counts, set the counts with the following endpoint:

.. autoflask:: mock_vws._flask_server.target_manager:TARGET_MANAGER_FLASK_APP
.. autoflask:: vws_mock_server.target_manager:TARGET_MANAGER_FLASK_APP
:endpoints: set_target_recognition_counts


Expand Down Expand Up @@ -281,7 +281,7 @@ These commands build the images with ``docker buildx``.
.. code-block:: console

$ export REPOSITORY_ROOT="$PWD"
$ export DOCKERFILE="$REPOSITORY_ROOT/src/mock_vws/_flask_server/Dockerfile"
$ export DOCKERFILE="$REPOSITORY_ROOT/server/Dockerfile"

$ export TARGET_MANAGER_TAG=ghcr.io/vws-python/vuforia-target-manager-mock:latest
$ export VWS_TAG=ghcr.io/vws-python/vuforia-vws-mock:latest
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ ignore = [
"newsfragments/**",
"prek.toml",
"secrets.tar.gpg",
"server/Dockerfile",
"spelling_private_dict.txt",
"src/mock_vws/_flask_server/Dockerfile",
"styles/snapper/*.yml",
"tests",
"tests/**",
Expand Down
6 changes: 3 additions & 3 deletions src/mock_vws/_flask_server/Dockerfile → server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ HEALTHCHECK --interval=1s --timeout=10s --start-period=5s --retries=3 CMD ["pyth

FROM base AS vws
ENV VWS_HOST=0.0.0.0
CMD ["src/mock_vws/_flask_server/vws.py"]
CMD ["-m", "vws_mock_server.vws"]

FROM base AS vwq
ENV VWQ_HOST=0.0.0.0
CMD ["src/mock_vws/_flask_server/vwq.py"]
CMD ["-m", "vws_mock_server.vwq"]

FROM base AS target-manager
ENV TARGET_MANAGER_HOST=0.0.0.0
CMD ["src/mock_vws/_flask_server/target_manager.py"]
CMD ["-m", "vws_mock_server.target_manager"]
2 changes: 1 addition & 1 deletion tests/mock_vws/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def _build_image(
The built image.
"""
client = docker.from_env()
dockerfile = f"{repository_root}/src/mock_vws/_flask_server/Dockerfile"
dockerfile = f"{repository_root}/server/Dockerfile"
try:
image, _ = client.images.build(
path=repository_root,
Expand Down
Loading