Skip to content

Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.

Add GitHub Action for Client (#99)

Patcher9932f1833a4f26
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 9b6b2514..6bd16b49 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -11,6 +11,83 @@ permissions:
contents: write
jobs:
+ client-docker:
+ name: Client Docker Image
+ runs-on: ubuntu-latest
+ outputs:
+ version: ${{ steps.set-version-output.outputs.version }}
+ permissions:
+ contents: write
+ packages: write
+ id-token: write
+ env:
+ IMAGE_NAME: ${{ github.repository }}-client
+
+ steps:
+ - name: Get current date and time
+ id: datetime
+ run: echo "::set-output name=datetime::$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
+
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Install cosign
+ uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 #v3.4.0
+ with:
+ cosign-release: 'v2.1.1'
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@0d103c3126aa41d772a8362f6aa67afac040f80c # v3.1.0
+
+ - name: Code Format Check (gofmt)
+ run: |
+ if [ -n "$(gofmt -l .)" ]; then
+ echo "Go code is not formatted:"
+ gofmt -d .
+ exit 1
+ fi
+
+ - name: Log into registry ${{ env.REGISTRY }}
+ uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
+ with:
+ registry: ${{ env.REGISTRY }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Extract Docker metadata
+ id: meta
+ uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
+ with:
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
+ env:
+ DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
+
+ - name: Build and push Docker image
+ id: build-and-push
+ uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
+ with:
+ context: ./src/client/
+ provenance: false
+ file: ./src/client/Dockerfile
+ push: ${{ github.event_name != 'pull_request' }}
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+ platforms: linux/amd64,linux/arm64/v8
+ annotations: |
+ ${{ steps.meta.outputs.annotations }},
+ io.artifacthub.package.logo-url=https://github.com/dokulabs/.github/blob/main/profile/assets/logo-orange-bg.jpg?raw=true,
+ io.artifacthub.package.readme-url=https://raw.githubusercontent.com/dokulabs/doku/main/README.md,
+ io.artifacthub.package.license=Apache-2.0,
+ org.opencontainers.image.vendor=Doku Labs,
+ io.artifacthub.package.maintainers=[{'name':'Doku Labs','email':'[email protected]'}],
+ io.artifacthub.package.keywords='Monitoring, Observability, LLMs, OpenAI'
+
+ - name: Sign the published Docker image
+ env:
+ TAGS: ${{ steps.meta.outputs.tags }}
+ DIGEST: ${{ steps.build-and-push.outputs.digest }}
+ run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
+
ingester-docker:
name: Ingester Docker Image
runs-on: ubuntu-latest
diff --git a/assets/.env.example b/assets/.env.example
index f9635d05..21ac1aa7 100644
--- a/assets/.env.example
+++ b/assets/.env.example
@@ -1,6 +1,5 @@
export DOKU_DB_HOST="127.0.0.1"
-export DOKU_DB_PASSWORD="<DB_PASSWORD>"
-export DOKU_DB_PORT="5432"
-export DOKU_DB_SSLMODE="require"
+export DOKU_DB_PORT="9000"
+export DOKU_DB_NAME="<DB_NAME>"
export DOKU_DB_USER="<DB_USER>"
-export DOKU_DB_NAME="<DB_NAME>"
\ No newline at end of file
+export DOKU_DB_PASSWORD="<DB_PASSWORD>"
diff --git a/docker-compose.yml b/docker-compose.yml
index 86bf380f..18030d54 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -15,7 +15,7 @@ services:
restart: always
doku-ingester:
- image: ghcr.io/dokulabs/doku-ingester:0.0.6
+ image: ghcr.io/dokulabs/doku-ingester:latest
container_name: doku-ingester
environment:
DOKU_DB_HOST: clickhouse
@@ -30,7 +30,7 @@ services:
restart: always
doku-client:
- image: ghcr.io/patcher99/doku-client:0.0.10
+ image: ghcr.io/dokulabs/doku-client:latest
container_name: doku-client
environment:
INIT_DB_HOST: clickhouse
@@ -47,24 +47,6 @@ services:
- doku-client-data:/app/client/data
restart: always
- doku-client:
- image: doku-client
- build:
- context: ./src/client
- dockerfile: Dockerfile
- container_name: doku-client
- environment:
- SQLITE_DATABASE_URL: file:/app/client/data/data.db
- INIT_DB_USERNAME: ${DOKU_DB_USER:-default}
- INIT_DB_PASSWORD: ${DOKU_DB_PASSWORD:-DOKU}
- INIT_DB_HOST: clickhouse
- INIT_DB_PORT: 8123
- INIT_DB_DATABASE: ${DOKU_DB_NAME:-default}
- ports:
- - "3000:3000"
- volumes:
- - doku-client-data:/app/client/data
-
volumes:
clickhouse-data:
- doku-client-data:
\ No newline at end of file
+ doku-client-data: