Skip to content
This repository was archived by the owner on Oct 30, 2026. It is now read-only.

Commit 6de2ef4

Browse files
Merge pull request #3819 from VWS-Python/codex/server-owned-docker-20261029
Run server-owned Docker images through installed modules
2 parents dab5a69 + 6c0e31f commit 6de2ef4

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎docker-bake.hcl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ group "default" {
77
}
88

99
target "_base" {
10-
dockerfile = "src/mock_vws/_flask_server/Dockerfile"
10+
dockerfile = "server/Dockerfile"
1111
platforms = ["linux/amd64", "linux/arm64"]
1212
}
1313

‎docs/source/docker.rst‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ Run each readiness probe until it exits successfully:
110110

111111
.. code-block:: console
112112
113-
$ container exec vuforia-target-manager-mock python /app/src/mock_vws/_flask_server/healthcheck.py
114-
$ container exec vuforia-vws-mock python /app/src/mock_vws/_flask_server/healthcheck.py
115-
$ container exec vuforia-vwq-mock python /app/src/mock_vws/_flask_server/healthcheck.py
113+
$ container exec vuforia-target-manager-mock python -m vws_mock_server.healthcheck
114+
$ container exec vuforia-vws-mock python -m vws_mock_server.healthcheck
115+
$ container exec vuforia-vwq-mock python -m vws_mock_server.healthcheck
116116
117117
To stop and remove this deployment:
118118

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

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

137-
.. autoflask:: mock_vws._flask_server.target_manager:TARGET_MANAGER_FLASK_APP
137+
.. autoflask:: vws_mock_server.target_manager:TARGET_MANAGER_FLASK_APP
138138
:endpoints: create_cloud_database
139139

140140
For example, with either deployment above, use ``curl``:
@@ -170,7 +170,7 @@ Deleting a database
170170

171171
To delete a database use the following endpoint:
172172

173-
.. autoflask:: mock_vws._flask_server.target_manager:TARGET_MANAGER_FLASK_APP
173+
.. autoflask:: vws_mock_server.target_manager:TARGET_MANAGER_FLASK_APP
174174
:endpoints: delete_cloud_database
175175

176176
Setting the recognition counts of a target
@@ -179,7 +179,7 @@ Setting the recognition counts of a target
179179
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.
180180
To make the target summary report and the reco counts report show non-zero counts, set the counts with the following endpoint:
181181

182-
.. autoflask:: mock_vws._flask_server.target_manager:TARGET_MANAGER_FLASK_APP
182+
.. autoflask:: vws_mock_server.target_manager:TARGET_MANAGER_FLASK_APP
183183
:endpoints: set_target_recognition_counts
184184

185185

@@ -281,7 +281,7 @@ These commands build the images with ``docker buildx``.
281281
.. code-block:: console
282282
283283
$ export REPOSITORY_ROOT="$PWD"
284-
$ export DOCKERFILE="$REPOSITORY_ROOT/src/mock_vws/_flask_server/Dockerfile"
284+
$ export DOCKERFILE="$REPOSITORY_ROOT/server/Dockerfile"
285285
286286
$ export TARGET_MANAGER_TAG=ghcr.io/vws-python/vuforia-target-manager-mock:latest
287287
$ export VWS_TAG=ghcr.io/vws-python/vuforia-vws-mock:latest

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ ignore = [
374374
"newsfragments/**",
375375
"prek.toml",
376376
"secrets.tar.gpg",
377+
"server/Dockerfile",
377378
"spelling_private_dict.txt",
378-
"src/mock_vws/_flask_server/Dockerfile",
379379
"styles/snapper/*.yml",
380380
"tests",
381381
"tests/**",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ HEALTHCHECK --interval=1s --timeout=10s --start-period=5s --retries=3 CMD ["pyth
3030

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

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

3939
FROM base AS target-manager
4040
ENV TARGET_MANAGER_HOST=0.0.0.0
41-
CMD ["src/mock_vws/_flask_server/target_manager.py"]
41+
CMD ["-m", "vws_mock_server.target_manager"]

‎tests/mock_vws/test_docker.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def _build_image(
321321
The built image.
322322
"""
323323
client = docker.from_env()
324-
dockerfile = f"{repository_root}/src/mock_vws/_flask_server/Dockerfile"
324+
dockerfile = f"{repository_root}/server/Dockerfile"
325325
try:
326326
image, _ = client.images.build(
327327
path=repository_root,

0 commit comments

Comments
 (0)