mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-13 08:15:21 +02:00
feat: add a start docker script (#426)
Adds a start docker script so that we have required values like OSS_JWT_SECRET at runtime
This commit is contained in:
parent
a81cccc68b
commit
97d7103480
7 changed files with 258 additions and 20 deletions
|
|
@ -20,18 +20,27 @@ Watch the video tutorial below for a step-by-step walkthrough of setting up Dogr
|
|||
allowFullScreen
|
||||
></iframe>
|
||||
|
||||
For local development and testing, you can run Dograh AI directly on your machine using Docker with a single command.
|
||||
For local development and testing, you can run Dograh AI directly on your machine using Docker with a small startup script.
|
||||
|
||||
### Quick Start
|
||||
|
||||
Run this single command to download and start Dograh AI:
|
||||
Download the compose file and starter script, then confirm the prompt to start Dograh AI:
|
||||
|
||||
```bash
|
||||
curl -o docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml && REGISTRY=ghcr.io/dograh-hq ENABLE_TELEMETRY=true docker compose up --pull always
|
||||
<CodeGroup>
|
||||
```bash macOS/Linux
|
||||
curl -o docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml && curl -o start_docker.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.sh && chmod +x start_docker.sh && ./start_docker.sh
|
||||
```
|
||||
```powershell Windows
|
||||
Invoke-WebRequest -OutFile docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml
|
||||
Invoke-WebRequest -OutFile start_docker.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.ps1
|
||||
.\start_docker.ps1
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
This command:
|
||||
This setup:
|
||||
- Downloads the latest docker-compose.yaml
|
||||
- Creates `OSS_JWT_SECRET` in `.env` if one does not already exist
|
||||
- Prompts before running Docker Compose
|
||||
- Starts all required services including PostgreSQL, Redis, MinIO, API, and UI
|
||||
- Pulls the latest images automatically
|
||||
|
||||
|
|
@ -43,7 +52,7 @@ http://localhost:3010
|
|||
```
|
||||
|
||||
<Note>
|
||||
You can disable telemetry by setting `ENABLE_TELEMETRY=false` in the command above.
|
||||
You can disable telemetry by setting `ENABLE_TELEMETRY=false` before running `./start_docker.sh` or `.\start_docker.ps1`.
|
||||
</Note>
|
||||
|
||||
### Troubleshooting WebRTC Connectivity
|
||||
|
|
@ -72,7 +81,7 @@ The script will prompt you for:
|
|||
- The host browsers should use to reach TURN (press Enter for `127.0.0.1`; use your LAN IP if testing from another device on the same network)
|
||||
- A shared secret for the TURN server (press Enter to generate a random one)
|
||||
|
||||
It creates `docker-compose.yaml`, a `.env` file with TURN credentials, and the small helper bundle that `dograh-init` uses to render coturn config at startup. Start the stack with the `local-turn` profile so coturn comes up alongside the other services:
|
||||
It creates `docker-compose.yaml`, a `.env` file with JWT and TURN credentials, and the small helper bundle that `dograh-init` uses to render coturn config at startup. Start the stack with the `local-turn` profile so coturn comes up alongside the other services:
|
||||
|
||||
```bash
|
||||
docker compose --profile local-turn up --pull always
|
||||
|
|
|
|||
|
|
@ -67,12 +67,20 @@ The script overwrites `docker-compose.yaml` and the remote helper bundle (`remot
|
|||
|
||||
## Local deployment
|
||||
|
||||
For local Docker installs (the [Quick Start](/deployment/docker#quick-start) flow or `setup_local.sh` / `setup_local.ps1`), there are no host-side config files to refresh — pull new images and restart:
|
||||
For local Docker installs (the [Quick Start](/deployment/docker#quick-start) flow or `setup_local.sh` / `setup_local.ps1`), there are no host-side config files to refresh — stop the stack, then use the startup script to preserve `OSS_JWT_SECRET` and pull new images:
|
||||
|
||||
```bash
|
||||
<CodeGroup>
|
||||
```bash macOS/Linux
|
||||
curl -o start_docker.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.sh && chmod +x start_docker.sh
|
||||
docker compose down
|
||||
docker compose up --pull always
|
||||
./start_docker.sh
|
||||
```
|
||||
```powershell Windows
|
||||
Invoke-WebRequest -OutFile start_docker.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.ps1
|
||||
docker compose down
|
||||
.\start_docker.ps1
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
To pin a specific version instead of `latest`, edit `docker-compose.yaml` and change both `image:` lines for `api` and `ui` to the same tag (e.g. `:1.28.0` — Docker image tags use bare semver, no `v` prefix), then run the commands above.
|
||||
|
||||
|
|
|
|||
|
|
@ -24,16 +24,23 @@ Watch the following video to learn about Dograh’s capabilities.
|
|||
|
||||
## Setting up
|
||||
|
||||
Get the platform up and running using Docker with a single command on your local computer. If you are looking to deploy the platform on a server different than your local machine, please check the [Deployment](deployment/introduction) section.
|
||||
Get the platform up and running using Docker with a small startup script on your local computer. If you are looking to deploy the platform on a server different than your local machine, please check the [Deployment](deployment/introduction) section.
|
||||
|
||||
<Note>We collect anonymous usage data to improve the product. You can opt out by setting the `ENABLE_TELEMETRY` to `false` in the below command.</Note>
|
||||
<Note>We collect anonymous usage data to improve the product. You can opt out by setting `ENABLE_TELEMETRY=false` before running the startup script.</Note>
|
||||
|
||||
```bash
|
||||
curl -o docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml && REGISTRY=ghcr.io/dograh-hq ENABLE_TELEMETRY=true docker compose up --pull always
|
||||
<CodeGroup>
|
||||
```bash macOS/Linux
|
||||
curl -o docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml && curl -o start_docker.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.sh && chmod +x start_docker.sh && ./start_docker.sh
|
||||
```
|
||||
```powershell Windows
|
||||
Invoke-WebRequest -OutFile docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml
|
||||
Invoke-WebRequest -OutFile start_docker.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.ps1
|
||||
.\start_docker.ps1
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
Please check [Prerequisites](getting-started/prerequisites) for the system requirements and [Troubleshooting](getting-started/troubleshooting) for common issues.
|
||||
|
||||
## Next Steps
|
||||
|
||||
You can see how to configure the inference provider in [Inference Provider](/configurations/inference-providers).
|
||||
You can see how to configure the inference provider in [Inference Provider](/configurations/inference-providers).
|
||||
|
|
|
|||
|
|
@ -74,12 +74,23 @@ Dograh images are available from two registries:
|
|||
- **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:
|
||||
To use a specific registry, set the `REGISTRY` environment variable when running the startup script:
|
||||
|
||||
<CodeGroup>
|
||||
```bash
|
||||
# Using GitHub Container Registry (recommended)
|
||||
REGISTRY=ghcr.io/dograh-hq docker compose up --pull always
|
||||
REGISTRY=ghcr.io/dograh-hq ./start_docker.sh
|
||||
|
||||
# Using Docker Hub
|
||||
REGISTRY=dograhai docker compose up --pull always
|
||||
REGISTRY=dograhai ./start_docker.sh
|
||||
```
|
||||
```powershell Windows
|
||||
# Using GitHub Container Registry (recommended)
|
||||
$env:REGISTRY = 'ghcr.io/dograh-hq'
|
||||
.\start_docker.ps1
|
||||
|
||||
# Using Docker Hub
|
||||
$env:REGISTRY = 'dograhai'
|
||||
.\start_docker.ps1
|
||||
```
|
||||
</CodeGroup>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue