Docker Compose
Deploy Crow CI using Docker Compose or Docker Swarm.
Prerequisites
Section titled “Prerequisites”- Docker and Docker Compose installed
- OAuth application created on your forge
- Domain configured (for production)
Volumes
Section titled “Volumes”| Path | Purpose |
|---|---|
/var/lib/crow | Server data (SQLite database, critical to persist) |
/etc/crow | Agent configuration (persist to avoid duplicate registrations) |
Docker Compose
Section titled “Docker Compose”-
Create a
.envfile with your configuration:Terminal window CROW_HOST=https://ci.example.comCROW_AGENT_SECRET=your-secret-hereCROW_GITHUB_CLIENT=your-oauth-clientCROW_GITHUB_SECRET=your-oauth-secret -
Create
docker-compose.yml:services:server:image: codeberg.org/crowci/crow-server:<version>ports:- "8000:8000"volumes:- crow-server:/var/lib/crowenvironment:- CROW_OPEN=true- CROW_HOST=${CROW_HOST}- CROW_AGENT_SECRET=${CROW_AGENT_SECRET}- CROW_GITHUB=true- CROW_GITHUB_CLIENT=${CROW_GITHUB_CLIENT}- CROW_GITHUB_SECRET=${CROW_GITHUB_SECRET}agent:image: codeberg.org/crowci/crow-agent:<version>restart: alwaysdepends_on:- servervolumes:- crow-agent:/etc/crow- /var/run/docker.sock:/var/run/docker.sockenvironment:- CROW_SERVER=server:9000- CROW_AGENT_SECRET=${CROW_AGENT_SECRET}volumes:crow-server:crow-agent: -
Start Crow:
Terminal window docker compose up -d -
Access the UI at
http://localhost:8000and log in with your forge account.
Adding the Autoscaler
Section titled “Adding the Autoscaler”The autoscaler is optional. See Autoscaler Configuration for details.
autoscaler: image: codeberg.org/crowci/crow-autoscaler:v4 restart: always depends_on: - server environment: - CROW_SERVER=https://ci.example.com - CROW_TOKEN=${CROW_TOKEN} - CROW_GRPC_ADDR=https://grpc.ci.example.com - CROW_GRPC_SECURE=true - CROW_PROVIDER=hetznercloud - CROW_HETZNERCLOUD_API_TOKEN=${HETZNER_TOKEN}Docker Swarm
Section titled “Docker Swarm”For Swarm deployments, use NFS volumes for persistence across nodes:
services: server: image: codeberg.org/crowci/crow-server:v4 networks: - traefik-public - crowci deploy: replicas: 1 volumes: - /nfs/crow/server:/var/lib/crow environment: CROW_OPEN: "true" CROW_HOST: "https://${CROW_DOMAIN}" CROW_FORGEJO: "true" CROW_FORGEJO_URL: "${FORGEJO_URL}" CROW_FORGEJO_CLIENT: "${FORGEJO_CLIENT}" CROW_FORGEJO_SECRET: "${FORGEJO_SECRET}"
agent: image: codeberg.org/crowci/crow-agent:v4 networks: - crowci depends_on: - server volumes: - /nfs/crow/agent:/etc/crow - /var/run/docker.sock:/var/run/docker.sock environment: CROW_SERVER: "server:9000" CROW_AGENT_SECRET: "${CROW_AGENT_SECRET}"
networks: crowci:Next Steps
Section titled “Next Steps”- Reverse Proxy Setup - Configure nginx, Caddy, or Traefik
- Server Configuration - All server options
- Agent Configuration - Agent settings