Skip to content
Merged
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
38 changes: 38 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Builds the API/web image on main and pushes it to GHCR, so the CasaOS
# host can `docker compose pull` instead of building deps locally.
name: Docker image

on:
push:
branches: [main]
workflow_dispatch:

jobs:
build-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ git pull
docker compose up -d --build
```

GitHub Actions runs tests + ruff on every PR (`.github/workflows/ci.yml`) and builds + pushes the image to GHCR on every merge to main (`.github/workflows/docker.yml`). To consume the prebuilt image on the CasaOS host instead of building locally, point the `api`/`web` services at `ghcr.io/agb1986/ai-data-store:latest` (already the `image:` in `docker-compose.yml`) and run `docker compose pull && docker compose up -d` — the local `build:` fallback keeps working either way.

## Laptop setup

Configure your MCP client with the server URL and API key printed during setup.
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:

api:
build: .
image: ghcr.io/agb1986/ai-data-store:latest
restart: unless-stopped
ports:
- "8742:8742"
Expand All @@ -23,6 +24,7 @@ services:

web:
build: .
image: ghcr.io/agb1986/ai-data-store:latest
restart: unless-stopped
command: ["python", "-m", "app.web"]
ports:
Expand Down
Loading