Skip to content

Commit 8213c6a

Browse files
committed
Update README.md to enhance architecture diagram styles, add deployment instructions, and clarify CI/CD pipeline details
1 parent e02986a commit 8213c6a

File tree

1 file changed

+46
-12
lines changed

1 file changed

+46
-12
lines changed

README.md

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ graph TB
4343
LLM -.->|Local| Ollama
4444
LLM -.->|Cloud| OpenAI
4545
46-
style YARP fill:#e1f5ff
47-
style API fill:#fff3e0
48-
style UI fill:#f3e5f5
49-
style PG fill:#e8f5e9
50-
style Redis fill:#ffebee
51-
style LLM fill:#fff9c4
46+
style YARP fill:#0078d4,stroke:#004578,stroke-width:2px,color:#fff
47+
style API fill:#f37021,stroke:#b85419,stroke-width:2px,color:#fff
48+
style UI fill:#5c2d91,stroke:#3d1e61,stroke-width:2px,color:#fff
49+
style PG fill:#336791,stroke:#274466,stroke-width:2px,color:#fff
50+
style Redis fill:#dc382d,stroke:#a52a22,stroke-width:2px,color:#fff
51+
style LLM fill:#ffc107,stroke:#c79100,stroke-width:2px,color:#000
52+
style User fill:#2d333b,stroke:#1c2128,stroke-width:2px,color:#fff
53+
style Ollama fill:#4caf50,stroke:#388e3c,stroke-width:2px,color:#fff
54+
style OpenAI fill:#10a37f,stroke:#0d8267,stroke-width:2px,color:#fff
5255
```
5356

5457
## High-Level Overview
@@ -80,13 +83,13 @@ graph TB
8083

8184
### Running the Application
8285

83-
Run the [AIChat.AppHost](AIChat.AppHost) project using the .NET Aspire tooling:
86+
Run the application:
8487

8588
```bash
8689
aspire run
8790
```
8891

89-
This project uses [.NET Aspire](https://learn.microsoft.com/en-us/dotnet/aspire/get-started/aspire-overview) to orchestrate the application components in containers.
92+
This project uses [Aspire](https://aspire.dev) to orchestrate the application components in containers.
9093

9194
### Configuration
9295

@@ -95,12 +98,43 @@ This project uses [.NET Aspire](https://learn.microsoft.com/en-us/dotnet/aspire/
9598
- The **PostgreSQL** database and **Redis** cache are automatically provisioned when running with Aspire.
9699
- Access the Aspire dashboard to monitor resources and view logs.
97100

101+
### Deployment
102+
103+
To deploy the application using Docker Compose:
104+
105+
```bash
106+
aspire deploy
107+
```
108+
109+
This generates a Docker Compose configuration in the `aspire-output` directory and runs the application stack. The deployment includes:
110+
111+
- All application services (ChatApi, UI)
112+
- PostgreSQL database with persistent volume
113+
- Redis cache
114+
- Configured networking between services
115+
116+
The application will be accessible at the configured ports, with all services orchestrated through Docker Compose.
117+
98118
## CI/CD
99119

100-
The project includes a GitHub Actions workflow that:
120+
The project uses **Aspire's pipeline system** to build and publish container images. The custom `push-gh` pipeline step (defined in `PipelineExtensions.cs`) handles:
121+
122+
- Building container images through Aspire's build pipeline
123+
- Tagging images with format: `<branch>-<build-number>-<git-sha>`
124+
- Pushing images to GitHub Container Registry (GHCR)
125+
126+
The GitHub Actions workflow invokes the pipeline with environment variables:
127+
128+
```yaml
129+
- name: Push to GitHub Container Registry
130+
run: aspire do push-gh
131+
env:
132+
GHCR_REPO: ghcr.io/${{ github.repository_owner }}
133+
BRANCH_NAME: ${{ github.ref_name }}
134+
BUILD_NUMBER: ${{ github.run_number }}
135+
GIT_SHA: ${{ github.sha }}
136+
```
101137
102-
- Builds container images for both the API and UI
103-
- Tags images with format: `<branch>-<build-number>-<git-sha>`
104-
- Pushes images to GitHub Container Registry (GHCR)
138+
The Aspire pipeline step reads these values, sanitizes the branch name for Docker compatibility, creates a semantic tag, and pushes the images to GHCR. This approach integrates seamlessly with Aspire's orchestration, allowing the AppHost to define both local development and CI/CD workflows in one place.
105139
106140
Images are available at: `ghcr.io/<owner>/chatapi` and `ghcr.io/<owner>/chatui`

0 commit comments

Comments
 (0)