GuideDocker Guide

Docker Guide

Complete guide to running Agor with Docker.

Quick Start

docker compose up

This starts:

  • Daemon (backend) on :3030
  • UI (frontend) on :5173
  • Auto-initialization with admin user

Configuration

Environment Variables

Agor respects the following environment variables for port configuration:

  • PORT - Daemon port (default: 3030)
  • VITE_PORT - UI port (default: 5173)
  • VITE_DAEMON_URL - Full daemon URL for UI (e.g., http://localhost:3030)
  • VITE_DAEMON_PORT - Daemon port for UI (alternative to full URL)
  • VITE_DAEMON_HOST - Daemon host for UI

Running Multiple Instances in Parallel

If you’re using git worktrees like Agor does internally and want to run multiple instances of Agor in parallel (e.g., one per feature branch), you can use Docker Compose’s project name flag and custom ports.

Example: Running Main + Feature Branch

Terminal 1 - Main branch:

cd ~/code/agor
docker compose up
# Runs on ports 3030 (daemon) and 5173 (UI)

Terminal 2 - Feature branch:

cd ~/code/agor-feature-auth
PORT=4030 VITE_PORT=5174 docker compose -p agor-feature-auth up
# Runs on ports 4030 (daemon) and 5174 (UI)

Terminal 3 - Another feature:

cd ~/code/agor-feature-payments
PORT=5030 VITE_PORT=5175 docker compose -p agor-feature-payments up
# Runs on ports 5030 (daemon) and 5175 (UI)

Port Naming Convention

When running multiple instances, use sequential ports to avoid conflicts:

InstanceDaemon PortUI PortProject Name
Main30305173agor (default)
Feature 140305174agor-feature-auth
Feature 250305175agor-feature-boards
Feature 360305176agor-feature-search

Why Use -p Flag?

The -p (project name) flag ensures each instance has:

  • Isolated Docker volumes - Separate databases per instance
  • Unique container names - No naming conflicts
  • Independent networks - No port binding conflicts

Without -p, Docker Compose would try to reuse the same containers and volumes, causing conflicts.

Accessing Multiple Instances

Once running, you can access each instance in your browser:

Cleaning Up

To stop and remove a specific instance:

# Stop containers
docker compose -p agor-feature-auth down
 
# Stop and remove volumes (deletes database)
docker compose -p agor-feature-auth down -v
BSL 1.1 © 2025 Maxime Beauchemin