You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: Update README for development and production modes; enhance Dockerfile cleanup and user permissions; adjust pyproject.toml for local dependencies
Copy file name to clipboardExpand all lines: README.md
+40-3Lines changed: 40 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -225,25 +225,60 @@ cd infrastructure/rag;helm dependency update; cd ../..
225
225
226
226
After the initial build of the helm chart *Tilt* is able to update the files.
227
227
228
+
##### Development vs Production Mode
229
+
230
+
The template supports two deployment modes for local development:
231
+
232
+
-**Production Mode** (default): Uses production Dockerfiles with local library dependencies for realistic testing
233
+
-**Development Mode**: Uses development Dockerfiles with live code updates for fast iteration
234
+
228
235
The following will tear up the microservices in *k3d*.
229
236
For the following steps, it is assumed your current working directory is the root of the git-repository.
230
237
238
+
**Production Mode (default):**
239
+
231
240
```shell
232
241
tilt up
233
242
```
234
243
244
+
**Development Mode:**
245
+
246
+
```shell
247
+
tilt up -- --dev=true
248
+
```
249
+
250
+
##### Docker File Structure
251
+
252
+
Each service now has separate Docker files optimized for different use cases:
253
+
254
+
-`Dockerfile`: Production-optimized builds with multi-stage architecture and security hardening
255
+
-`Dockerfile.dev`: Development-optimized builds with faster build times and development tools
256
+
257
+
The Tilt configuration automatically selects the appropriate Dockerfile based on the mode:
258
+
259
+
- Production mode uses `Dockerfile` with local library dependencies (`prod-local` group)
260
+
- Development mode uses `Dockerfile.dev` with live code updates and development dependencies
261
+
235
262
Environment variables are loaded from `.env` file in the root of this git-repository.
236
263
237
264
The *Tilt* UI is available at [http://localhost:10350/](http://localhost:10350/)
238
265
239
266
If you want to access *Qdrant* etc. just click the resource in the UI. In the upper corner will be the link, to access the resource.
240
267
268
+
##### Debugging
269
+
241
270
To enable debugging, start tilt with the following command:
242
271
243
272
```shell
244
273
tilt up -- --debug=true
245
274
```
246
275
276
+
It is recommended to combine debugging with development mode:
277
+
278
+
```shell
279
+
tilt up -- --debug=true --dev=true
280
+
```
281
+
247
282
The backend will wait until your debugger is connected before it will fully start.
248
283
The debugger used is `debugpy` which is compatible with VS Code.
249
284
To connect the debugger, you can use the following `launch.json`:
@@ -368,10 +403,12 @@ A detailed explanation of, how to access a service via ingress, can be found in
368
403
### 2.1 Server provisioning
369
404
370
405
The RAG template requires *at least*:
371
-
- A Kubernetes Cluster
372
-
- S3 ObjectStorage
406
+
407
+
- A Kubernetes Cluster
408
+
- S3 ObjectStorage
373
409
374
410
Provided is an example Terraform script, using the [STACKIT Terrraform Provider](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs):
411
+
375
412
```terraform
376
413
resource "stackit_ske_project" "rag-ske" {
377
414
project_id = var.stackit_project_id
@@ -429,8 +466,8 @@ Further requirements for the server can be found in the [infrastructure README](
429
466
430
467
A detailed description regarding the configuration of Langfuse can be found in the [infrastructure README](./infrastructure/README.md).
431
468
432
-
433
469
## 3. Build and Test
470
+
434
471
The example `Tiltfile` provides a triggered linting and testing.
435
472
The linting-settings can be changed in the `services/rag-backend/pyproject.toml` file under section `tool.flake8`.
0 commit comments