Skip to content

Docker Compose

Use Compose when you want the server definition, persistent volume, repository mounts, and environment in one file.

yaml
services:
  stib:
    image: enixion/stib-server:latest
    restart: unless-stopped
    ports:
      - "50505:50505"
    volumes:
      - stib-data:/data
      - ./projects:/projects
    environment:
      RUST_LOG: info
      # STIB_SERVER_ORIGIN: https://stib.example.com
      # STIB_ENCRYPTION_KEY: ${STIB_ENCRYPTION_KEY}
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:50505/api/health"]
      interval: 30s
      timeout: 5s
      retries: 3

volumes:
  stib-data:

Create projects with paths below /projects. If you choose a different container path, keep it stable across recreations so stored project paths remain valid.

Start and operate

bash
docker compose up -d
docker compose ps
docker compose logs -f stib

Stop without deleting the named volume:

bash
docker compose down

Update the image:

bash
docker compose pull
docker compose up -d

Create a consistent backup in the Stib settings before an update. Compose does not remove the stib-data named volume with down unless you explicitly add --volumes.

Reverse proxy

Terminate HTTPS at the proxy and forward HTTP plus WebSocket upgrades to container port 50505. Set STIB_SERVER_ORIGIN to the public HTTPS origin when configuring OIDC. Do not add /api to the origin.

Sandboxed agents

Per-project agent containers require Docker API access and additional environment/mounts. This is a privileged deployment choice, not enabled by the minimal file above. Review the security implications before exposing the Docker socket.

Next: Configuration.