Skip to content

Agent 6: Docker Compose local dev setup #6

@TomProkop

Description

@TomProkop

Objective

Create docker-compose files for local development — run the full AgentBox stack locally with portal + container + mock environment.

Scope

Files to create (root directory ONLY — do NOT touch src/, infra/, or .github/):

docker-compose.yml

services:
  portal:
    build:
      context: src/portal/AgentBox.Portal
      dockerfile: Dockerfile
    ports:
      - "5001:8080"
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ACI__ResourceGroup=agentbox-containers-dev
      - ACI__SubscriptionId=${AZURE_SUBSCRIPTION_ID}
      - ACI__Location=westeurope
      - ACI__ContainerImage=ghcr.io/networg/agentbox:latest
      - KeyVault__Uri=${KEYVAULT_URI}
      - TableStorage__ConnectionString=${TABLE_STORAGE_CONNECTION}
    depends_on:
      - azurite

  agentbox:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8080:80"
      - "2222:2222"
    environment:
      - GH_TOKEN=${GH_TOKEN}
      - COPILOT_GITHUB_TOKEN=${COPILOT_GITHUB_TOKEN:-}

  azurite:
    image: mcr.microsoft.com/azure-storage/azurite
    ports:
      - "10000:10000"  # Blob
      - "10001:10001"  # Queue
      - "10002:10002"  # Table
    volumes:
      - azurite-data:/data

volumes:
  azurite-data:

docker-compose.dev.yml (override for secrets)

services:
  portal:
    environment:
      - GitHub__ClientId=${GITHUB_CLIENT_ID}
      - GitHub__ClientSecret=${GITHUB_CLIENT_SECRET}
      - ADO__ClientSecret=${ADO_CLIENT_SECRET}
      - Atlassian__ClientId=${ATLASSIAN_CLIENT_ID}
      - Atlassian__ClientSecret=${ATLASSIAN_CLIENT_SECRET}
    volumes:
      - ./src/portal/AgentBox.Portal:/app:cached  # Hot reload

.env.example

# Azure
AZURE_SUBSCRIPTION_ID=your-subscription-id
KEYVAULT_URI=https://agentbox-kv-dev.vault.azure.net/
TABLE_STORAGE_CONNECTION=DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=...;TableEndpoint=http://azurite:10002/devstoreaccount1;

# GitHub
GH_TOKEN=ghu_your_github_token
COPILOT_GITHUB_TOKEN=
GITHUB_CLIENT_ID=your-github-app-client-id
GITHUB_CLIENT_SECRET=your-github-app-client-secret

# Azure DevOps
ADO_CLIENT_SECRET=your-ado-client-secret

# Atlassian
ATLASSIAN_CLIENT_ID=your-atlassian-client-id
ATLASSIAN_CLIENT_SECRET=your-atlassian-client-secret

Key Design Decisions

  • Azurite for local Table Storage emulation (BoxMetadata) — free, no Azure account needed
  • Portal connects to real Azure for ACI management (or can be mocked)
  • AgentBox container runs locally with token injection via env vars
  • .env.example committed, .env in .gitignore
  • Dev override mounts source for hot reload

Conflict Prevention

This agent creates ONLY: docker-compose.yml, docker-compose.dev.yml, .env.example.
Also updates .gitignore to include .env.
No other agent touches these files.

Dependencies

Acceptance Criteria

  • docker compose config validates successfully
  • docker compose up azurite starts Azurite
  • .env.example documents all required variables
  • .gitignore includes .env

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions