From 43c56d0b95e076d3f920724f139a64d576832d97 Mon Sep 17 00:00:00 2001
From: Sabiha Khan <87858386+chewwbaka@users.noreply.github.com>
Date: Wed, 24 Sep 2025 21:42:39 +0530
Subject: [PATCH] feat: create docker-image.yml, update README.md and
docker-compose.yaml
---
.github/workflows/docker-image.yml | 70 ++++++++++++++++++++++++++++++
README.md | 50 ++++++++++++++-------
docker-compose.yaml | 8 ++--
3 files changed, 109 insertions(+), 19 deletions(-)
create mode 100644 .github/workflows/docker-image.yml
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
new file mode 100644
index 0000000..1babe5a
--- /dev/null
+++ b/.github/workflows/docker-image.yml
@@ -0,0 +1,70 @@
+name: Build and Push Docker Images
+
+on:
+ push:
+ branches:
+ - main
+
+# Ensure only one workflow run per branch at a time; cancel any in-progress runs on new push
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ env:
+ COMMIT_SHA: ${{ github.sha }} # Used to tag images with short commit SHA
+
+ strategy:
+ matrix:
+ service:
+ - "dograh-api|api/Dockerfile|./api"
+ - "dograh-ui|ui/Dockerfile|./ui"
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set up QEMU # Enables cross-platform builds (e.g., arm64)
+ uses: docker/setup-qemu-action@v3
+
+ - name: Set up Docker Buildx # Enables multi-arch and advanced Docker builds
+ uses: docker/setup-buildx-action@v3
+
+ - name: Log in to DockerHub
+ uses: docker/login-action@v3
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Log in to GHCR
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ secrets.GHCR_USERNAME }}
+ password: ${{ secrets.GHCR_TOKEN }}
+
+ - name: Build and Push ${{ matrix.service }}
+ run: |
+ # Parse matrix entry into individual variables
+ SERVICE="${{ matrix.service }}"
+ IMAGE_NAME=$(echo "$SERVICE" | cut -d '|' -f1)
+ DOCKERFILE=$(echo "$SERVICE" | cut -d '|' -f2)
+ CONTEXT=$(echo "$SERVICE" | cut -d '|' -f3)
+ SHORT_SHA=${COMMIT_SHA::8}
+
+ echo "Building and pushing image: $IMAGE_NAME"
+ echo "Dockerfile: $DOCKERFILE"
+ echo "Context: $CONTEXT"
+ echo "Commit SHA: $SHORT_SHA"
+
+ # Build and push multi-arch Docker image to DockerHub and GHCR
+ docker buildx build \
+ -f "$DOCKERFILE" \
+ --platform linux/amd64,linux/arm64 \
+ --tag ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:$SHORT_SHA \
+ --tag ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest \
+ --tag ghcr.io/${{ secrets.GHCR_USERNAME }}/$IMAGE_NAME:$SHORT_SHA \
+ --tag ghcr.io/${{ secrets.GHCR_USERNAME }}/$IMAGE_NAME:latest \
+ --push "$CONTEXT"
diff --git a/README.md b/README.md
index 68c39d4..d99b909 100644
--- a/README.md
+++ b/README.md
@@ -23,24 +23,31 @@ Build voice agents in just one line or drag-and-drop, then test them using AI pe
Maintained by YC alumni and exit founders, we're making sure the future of voice AI stays open, not monopolized.
## 🎥 Demo Video
-[](https://www.youtube.com/watch?v=LK8mvK5TH2Q)
+
+
+
+
+
+
+
Click to watch a 2-minute demo of Dograh AI in action
+
## 🚀 Get Started
The only command you need to run:
+##### Download and start Dograh
```bash
-# Download and start Dograh
-curl -o docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml && docker compose up
+curl -o docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml && REGISTRY=ghcr.io/dograh-hq docker compose up
```
> **Note**
-> First startup may take 2-3 minutes to download all images. Once running, open http://localhost:3000 to create your first AI voice assistant!
+> First startup may take 2-3 minutes to download all images. Once running, open http://localhost:3010 to create your first AI voice assistant!
> For prerequisites, port issues, or troubleshooting, see the [Prerequisites and Troubleshooting](#-prerequisites-and-troubleshooting) section below.
### 🎙️ Your First Voice Bot
-1. **Open Dashboard**: Launch [http://localhost:3000](http://localhost:3000) on your browser
+1. **Open Dashboard**: Launch [http://localhost:3010](http://localhost:3010) on your browser
2. **Choose Call Type**: Select **Inbound** or **Outbound** calling.
3. **Name Your Bot**: Use a short two-word name (e.g., *Lead Qualification*).
4. **Describe Use Case**: In 5–10 words (e.g., *Screen insurance form submissions for purchase intent*).
@@ -91,7 +98,7 @@ To run Dograh AI locally, make sure you have the following installed:
### Required Ports
Ensure these ports are available:
-- `3000` - Web UI
+- `3010` - Web UI
- `8000` - API Server
- `5432` - PostgreSQL
- `6379` - Redis
@@ -100,20 +107,19 @@ Ensure these ports are available:
### Checking Port Availability
+##### Check if a port is in use (replace 3010 with the port number)
```bash
-# Check if a port is in use (replace 3000 with the port number)
-lsof -i :3000
+lsof -i :3010
```
### Freeing Up Ports
#### When a port is already in use:
+##### Check what's using the port first and then kill the process (may require sudo on Linux)
```bash
-# Check what's using the port first
-lsof -i :3000
+lsof -i :3010
-# Then kill the process (may require sudo on Linux)
-kill -9 $(lsof -t -i :3000)
+kill -9 $(lsof -t -i :3010)
```
#### When Docker containers are using the ports (with auto-restart enabled):
@@ -141,13 +147,27 @@ Check restart policies (should show 'no' for each container):
docker inspect -f '{{.Name}} - {{.HostConfig.RestartPolicy.Name}}' $(docker ps -a -q)
```
-### Stopping Dograh Services
+### Docker Registry Options
+Dograh images are available from two registries that you can choose from:
+
+- **GitHub Container Registry (Default)**: `ghcr.io/dograh-hq` - Recommended for most users
+- **Docker Hub**: `dograhai` - Alternative registry
+
+To use a specific registry, set the `REGISTRY` environment variable using either of the following:
+
+##### Using GitHub Container Registry (recommended) or Docker Hub
+```bash
+REGISTRY=ghcr.io/dograh-hq docker compose up
+
+REGISTRY=dograhai docker compose up
+```
+
+### Stopping Dograh Services
+##### Stop services or Stop and remove all data (full cleanup)
```bash
-# Stop services
docker compose down
-# Stop and remove all data (full cleanup)
docker compose down -v
```
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 3751c87..a9867b3 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -59,7 +59,7 @@ services:
- app-network
api:
- image: dograhai/dograh-api:latest
+ image: ${REGISTRY:-dograhai}/dograh-api:latest
volumes:
- shared-tmp:/tmp
environment:
@@ -122,7 +122,7 @@ services:
- app-network
arq-worker:
- image: dograhai/dograh-api:latest
+ image: ${REGISTRY:-dograhai}/dograh-api:latest
volumes:
- shared-tmp:/tmp
environment:
@@ -165,7 +165,7 @@ services:
- app-network
ui:
- image: dograhai/dograh-ui:latest
+ image: ${REGISTRY:-dograhai}/dograh-ui:latest
environment:
NEXT_PUBLIC_NODE_ENV: "local"
NEXT_PUBLIC_AUTH_PROVIDER: "local"
@@ -184,7 +184,7 @@ services:
# Sentry
NEXT_PUBLIC_ENABLE_SENTRY: "false"
ports:
- - "3000:3000"
+ - "3010:3000"
depends_on:
api:
condition: service_healthy