Commit 8e29b9f
feat(offline): authenticated offline deployment (Keycloak overlay) (#563)
* feat(offline): optionally bundle Keycloak in pull-and-save-images
Prompt whether to include the Keycloak image when saving images for an
offline transfer, so authenticated offline deployments have the IdP
available. The tag is read from docker-compose.prod.yml so it never
drifts from the auth overlay; appending to the image list means both the
pull and save loops pick it up. Honours INCLUDE_KEYCLOAK=true|false to
skip the prompt (defaults to excluding on a non-TTY, so CI is unchanged).
The run summary notes that the image alone isn't enough to run auth
offline (realm export + auth-enabled compose/nginx still needed).
Refs #559
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix/keycloak-image-parse-exit-and-portable-case
Two review fixes on the Keycloak opt-in:
- Append `|| true` to the KEYCLOAK_IMAGE command substitution so a
missing docker-compose.prod.yml or a no-match grep no longer exits the
whole script under `set -euo pipefail` (want_keycloak already handles an
empty tag gracefully).
- Replace the bash-4-only `${INCLUDE_KEYCLOAK,,}` with a portable
case-insensitive `case` pattern.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(offline): add authenticated offline deployment (Keycloak overlay)
Add docker-compose.offline-prod.yml — the offline equivalent of the prod
auth overlay, using pre-built images instead of building from source. It
adds a Keycloak service (import-realm), turns on backend auth, and points
nginx at an auth-enabled frontend image.
pull-and-save-images.sh now, when Keycloak is included, also builds and
saves an auth-enabled nginx image (tracepcap-nginx-auth) with the
VITE_AUTH_* / VITE_OIDC_* build args, and the run summary points at the
new overlay + PUBLIC_URL. Document the flow in offline-deployment.rst.
This makes "save the Keycloak image" actually usable offline end to end.
Refs #559
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(offline): pass VITE_APP_VERSION, fix api base, persist keycloak
Address review + a smoke-test failure of the offline auth path:
- Pass VITE_APP_VERSION to both nginx builds (resolved via git describe).
Without it the frontend build fails outright — vite.config.ts requires
it and git describe isn't available inside the Docker builder.
- Default VITE_API_BASE_URL to /api/v1 (matches nginx/Dockerfile and the
base compose) instead of /api, which routed the SPA to the wrong path.
- Parse the Keycloak image tag from docker-compose.offline-prod.yml (the
file that actually runs offline) so the saved image can't drift from it.
- Add a persistent keycloak_data volume so users created in the admin
console survive container recreate.
- Warn against a trailing slash in PUBLIC_URL in the offline docs.
Refs #559
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 323fa79 commit 8e29b9f
3 files changed
Lines changed: 159 additions & 8 deletions
File tree
- docs/getting-started
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
89 | 132 | | |
90 | 133 | | |
91 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
68 | | - | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | | - | |
| 75 | + | |
72 | 76 | | |
73 | | - | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
118 | 128 | | |
119 | 129 | | |
120 | | - | |
| 130 | + | |
121 | 131 | | |
122 | 132 | | |
| 133 | + | |
123 | 134 | | |
124 | 135 | | |
125 | 136 | | |
126 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
127 | 153 | | |
128 | 154 | | |
129 | 155 | | |
| |||
136 | 162 | | |
137 | 163 | | |
138 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
139 | 168 | | |
140 | 169 | | |
141 | 170 | | |
| |||
154 | 183 | | |
155 | 184 | | |
156 | 185 | | |
157 | | - | |
| 186 | + | |
| 187 | + | |
158 | 188 | | |
159 | | - | |
160 | | - | |
161 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
162 | 196 | | |
163 | 197 | | |
164 | 198 | | |
| |||
0 commit comments