Skip to content
Open
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
9 changes: 5 additions & 4 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
NODE_VERSION: '18'
PYTHON_VERSION: '3.11'
PYTHON_VERSION: '3.13'

jobs:
changes:
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

- name: Build Docker image
run: |
docker build -t $IMAGE_NAME --build-arg dev=1 -f services/${{ matrix.service }}/Dockerfile .
docker build -t $IMAGE_NAME -f services/${{ matrix.service }}/Dockerfile.dev .

- name: Run linting
run: |
Expand All @@ -104,15 +104,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set Docker Image Names
- name: Set Docker Image Name
run: |
echo "LINT_IMAGE_NAME=${{ matrix.library }}-lint:${{ needs.sanitize-branch-name.outputs.sanitized_ref }}-${{ github.run_number }}" >> $GITHUB_ENV
echo "TEST_IMAGE_NAME=${{ matrix.library }}-test:${{ needs.sanitize-branch-name.outputs.sanitized_ref }}-${{ github.run_number }}" >> $GITHUB_ENV
shell: bash

- name: Build lint image
run: |
docker build -t $LINT_IMAGE_NAME --build-arg TEST=0 -f libs/Dockerfile libs
docker build -t $LINT_IMAGE_NAME --build-arg DIRECTORY=${{ matrix.library }} --build-arg TEST=0 -f libs/Dockerfile libs


- name: Run linting
run: |
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,27 +90,21 @@ jobs:
- name: rag-backend
dockerfile: services/rag-backend/Dockerfile
image: rag-backend
build-args: "dev=0"
- name: admin-backend
dockerfile: services/admin-backend/Dockerfile
image: admin-backend
build-args: "dev=0"
- name: document-extractor
dockerfile: services/document-extractor/Dockerfile
image: document-extractor
build-args: "dev=0"
- name: mcp-server
dockerfile: services/mcp-server/Dockerfile
image: mcp-server
build-args: "dev=0"
- name: frontend
dockerfile: services/frontend/apps/chat-app/Dockerfile
image: frontend
build-args: ""
- name: admin-frontend
dockerfile: services/frontend/apps/admin-app/Dockerfile
image: admin-frontend
build-args: ""
steps:
- name: debug-job-inputs
run: |
Expand Down
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,25 +225,60 @@ cd infrastructure/rag;helm dependency update; cd ../..

After the initial build of the helm chart *Tilt* is able to update the files.

##### Development vs Production Mode

The template supports two deployment modes for local development:

- **Production Mode** (default): Uses production Dockerfiles with local library dependencies for realistic testing
- **Development Mode**: Uses development Dockerfiles with live code updates for fast iteration

The following will tear up the microservices in *k3d*.
For the following steps, it is assumed your current working directory is the root of the git-repository.

**Production Mode (default):**

```shell
tilt up
```

**Development Mode:**

```shell
tilt up -- --dev=true
```

##### Docker File Structure

Each service now has separate Docker files optimized for different use cases:

- `Dockerfile`: Production-optimized builds with multi-stage architecture and security hardening
- `Dockerfile.dev`: Development-optimized builds with faster build times and development tools

The Tilt configuration automatically selects the appropriate Dockerfile based on the mode:

- Production mode uses `Dockerfile` with local library dependencies (`prod-local` group)
- Development mode uses `Dockerfile.dev` with live code updates and development dependencies

Environment variables are loaded from `.env` file in the root of this git-repository.

The *Tilt* UI is available at [http://localhost:10350/](http://localhost:10350/)

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.

##### Debugging

To enable debugging, start tilt with the following command:

```shell
tilt up -- --debug=true
```

It is recommended to combine debugging with development mode:

```shell
tilt up -- --debug=true --dev=true
```

The backend will wait until your debugger is connected before it will fully start.
The debugger used is `debugpy` which is compatible with VS Code.
To connect the debugger, you can use the following `launch.json`:
Expand Down Expand Up @@ -368,10 +403,12 @@ A detailed explanation of, how to access a service via ingress, can be found in
### 2.1 Server provisioning

The RAG template requires *at least*:
- A Kubernetes Cluster
- S3 ObjectStorage

- A Kubernetes Cluster
- S3 ObjectStorage

Provided is an example Terraform script, using the [STACKIT Terrraform Provider](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs):

```terraform
resource "stackit_ske_project" "rag-ske" {
project_id = var.stackit_project_id
Expand Down Expand Up @@ -429,8 +466,8 @@ Further requirements for the server can be found in the [infrastructure README](

A detailed description regarding the configuration of Langfuse can be found in the [infrastructure README](./infrastructure/README.md).


## 3. Build and Test

The example `Tiltfile` provides a triggered linting and testing.
The linting-settings can be changed in the `services/rag-backend/pyproject.toml` file under section `tool.flake8`.

Expand Down
Loading
Loading