File tree Expand file tree Collapse file tree 4 files changed +104
-19
lines changed
examples/docker_fastapi_demo Expand file tree Collapse file tree 4 files changed +104
-19
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ This directory packages the current Northwind validation app as a self-contained
77- ` reference/ ` contains the shipped ` admin.yaml `
88- ` site/ ` contains the simple landing page served by nginx at ` / `
99- ` vendor/safrs/ ` is a vendored copy of the current SAFRS source used by the backend image
10- - ` vendor/safrs-jsonapi-client/ ` is a vendored client package used by the frontend
10+ - ` vendor/safrs-jsonapi-client/ ` is an optional local fallback for the frontend client package
1111
1212The container runs multiple processes:
1313
@@ -100,6 +100,18 @@ Container paths:
100100- default baked-in frontend: ` /app/frontend `
101101- dev-mounted frontend: ` /demo/frontend `
102102
103+ ## Client dependency source
104+
105+ By default, the frontend installs ` safrs-jsonapi-client ` from:
106+
107+ - ` https://codeload.github.com/thomaxxl/safrs-jsonapi-client/tar.gz/refs/heads/main `
108+
109+ To force local vendored fallback instead, set:
110+
111+ ``` bash
112+ USE_LOCAL_SAFRS_JSONAPI_CLIENT=1 docker compose up --build
113+ ```
114+
103115## Notes
104116
105117- The runtime SQLite database is stored in the ` northwind_demo_data ` Docker volume.
Original file line number Diff line number Diff line change @@ -56,6 +56,21 @@ export VITE_DEV_PORT="5173"
5656export VITE_HMR_CLIENT_PORT=" ${DEMO_EXTERNAL_PORT:- 8000} "
5757export VITE_HMR_PATH=" /admin-app/__vite_hmr"
5858
59+ SAFRS_JSONAPI_CLIENT_SPEC=" https://codeload.github.com/thomaxxl/safrs-jsonapi-client/tar.gz/refs/heads/main"
60+ if is_true " ${USE_LOCAL_SAFRS_JSONAPI_CLIENT:- 0} " ; then
61+ LOCAL_CLIENT_DIR=" $SOURCE_ROOT /vendor/safrs-jsonapi-client"
62+ if [ ! -f " $LOCAL_CLIENT_DIR /package.json" ]; then
63+ echo " USE_LOCAL_SAFRS_JSONAPI_CLIENT is set, but $LOCAL_CLIENT_DIR is missing" >&2
64+ exit 1
65+ fi
66+ SAFRS_JSONAPI_CLIENT_SPEC=" file:$LOCAL_CLIENT_DIR "
67+ fi
68+
69+ (
70+ cd " $SOURCE_ROOT /frontend"
71+ npm pkg set " dependencies.safrs-jsonapi-client=$SAFRS_JSONAPI_CLIENT_SPEC "
72+ )
73+
5974if [ " $SOURCE_ROOT " = " /demo" ]; then
6075 (cd /demo/frontend && npm install --no-audit --no-fund --package-lock=false)
6176elif [ ! -x /app/frontend/node_modules/.bin/vite ]; then
Original file line number Diff line number Diff line change 1717 "react" : " ^18.3.1" ,
1818 "react-admin" : " ^5.3.2" ,
1919 "react-dom" : " ^18.3.1" ,
20- "safrs-jsonapi-client" : " file:../vendor /safrs-jsonapi-client"
20+ "safrs-jsonapi-client" : " https://codeload.github.com/thomaxxl /safrs-jsonapi-client/tar.gz/refs/heads/main "
2121 },
2222 "devDependencies" : {
2323 "@playwright/test" : " ^1.58.2" ,
You can’t perform that action at this time.
0 commit comments