Docker Compose Setup

Deploy Weik.io using Docker Compose

The easiest way to get Weik.io running on your own infrastructure is with Docker Compose. This setup spins up the entire platform in a single environment.

Prerequisites

  • Docker Engine 20.10 or later
  • Docker Compose v2.0 or later
  • At least 4GB of available RAM
  • 10GB of available disk space

Architecture

The Docker Compose deployment runs six distinct services:

  • Traefik - The reverse proxy and load balancer
  • NATS - The messaging backbone that handles event streaming and agent communication
  • Backend - The core API and business logic
  • UI - The web interface you interact with
  • Agent - The local execution engine that actually runs the integration flows
  • APIM - The API Management gateway that routes incoming HTTP traffic

Quick Start

1. Create the Docker Compose File

Create a docker-compose.yml file with the following content. We use localtest.me domains here because they automatically resolve back to localhost, making local testing painless.

services:
  traefik:
    image: traefik:v2.10
    command:
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
    ports:
      - "8000:80"  # HTTP traffic
      - "8080:8080" # Traefik dashboard
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - weikio-network

  nats:
    image: nats:latest
    command: ["-p", "4222", "-m", "8222", "-js", "-sd", "/var/data"]
    volumes:
      - data:/var/data
    ports:
      - "4222:4222" # NATS TCP port
    networks:
      - weikio-network

  backend:
    image: weikio/backend:dev
    restart: unless-stopped
    environment:
      - 'WEIKIO_HOME=/etc/weikio'
      - 'ASPNETCORE_ENVIRONMENT=Development'
      - 'Weikio__Server__BaseAddress=http://backend/'
      - 'Weikio__Identity__LocalIdentity__IsEnabled=True'
      - 'Weikio__Identity__LocalIdentity__Username=dev@weik.io'
      - 'Weikio__Identity__LocalIdentity__Password=password'
      - 'Weikio__Identity__LocalIdentity__ApiKey=api.key'
      - 'Weikio__Nats__Url=nats://nats:4222'
      - 'ASPNETCORE_URLS=http://*:80'
    depends_on:
      - nats
    volumes:
      - data:/etc/weikio
    networks:
      - weikio-network
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.backend.rule=Host(`backend.localtest.me`)"
      - "traefik.http.routers.backend.entrypoints=web"
      - "traefik.http.services.backend-service.loadbalancer.server.port=80"
      - "traefik.http.routers.backend.service=backend-service"

  ui:
    image: weikio/ui:dev
    restart: unless-stopped
    environment:
      - 'WEIKIO_HOME=/etc/weikio'
      - 'ASPNETCORE_ENVIRONMENT=Development'
      - 'Weikio__Server__BaseAddress=http://backend/'
      - 'ASPNETCORE_URLS=http://*:80'
    depends_on:
      - backend
    volumes:
      - data:/etc/weikio
    networks:
      - weikio-network
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.ui.rule=Host(`weikio.localtest.me`)"
      - "traefik.http.routers.ui.entrypoints=web"
      - "traefik.http.services.ui-service.loadbalancer.server.port=80"
      - "traefik.http.routers.ui.service=ui-service"

  agent:
    image: weikio/agent:dev
    restart: unless-stopped
    environment:
      - 'WEIKIO_HOME=/etc/weikio'
      - 'ASPNETCORE_ENVIRONMENT=Development'
      - 'Weikio__Server__BaseAddress=http://backend/'
      - 'Weikio__Agent__JbangFromPath=true'
      - 'Weikio__Agent__Capabilities__Location=Local'
      - 'Weikio__Agent__Capabilities__Environment=DevTest'
      - 'Weikio__Nats__Url=nats://nats:4222'
    depends_on:
      - backend
    volumes:
      - data:/etc/weikio
    networks:
      - weikio-network

  apim:
    image: weikio/apim:dev
    restart: unless-stopped
    environment:
      - 'WEIKIO_HOME=/etc/weikio'
      - 'ASPNETCORE_ENVIRONMENT=Development'
      - 'Weikio__Server__BaseAddress=http://backend/'
      - 'Weikio__Nats__Url=nats://nats:4222'
      - 'ASPNETCORE_URLS=http://*:80'
    depends_on:
      - backend
    volumes:
      - data:/etc/weikio
    networks:
      - weikio-network
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.apim.rule=Host(`api.localtest.me`)"
      - "traefik.http.routers.apim.entrypoints=web"
      - "traefik.http.services.apim-service.loadbalancer.server.port=80"
      - "traefik.http.routers.apim.service=apim-service"

networks:
  weikio-network:

volumes:
  data:

2. Start the Services

docker-compose up -d

3. Verify Installation

Give it a minute to pull images and start up, then check the status:

docker-compose ps

Everything should say “Up” or “healthy”.

4. Access Weik.io

You can now hit the platform at:

The default credentials are intentionally weak for development:

  • Username: dev@weik.io
  • Password: password
  • API Key: api.key

Configuration

Environment Variables

The compose file above uses development settings. If you move this toward a real environment, you need to harden the Backend service variables:

  • ASPNETCORE_ENVIRONMENT - Set to Production
  • Weikio__Identity__LocalIdentity__Username - Pick a real admin email
  • Weikio__Identity__LocalIdentity__Password - Generate a strong password
  • Weikio__Identity__LocalIdentity__ApiKey - Generate a secure API key

Security for Production

Please don’t run the dev tag on an open port in production.

  1. Change the default credentials immediately.
  2. Configure Traefik with real TLS certificates for HTTPS (Let’s Encrypt makes this easy).
  3. Add authentication to your NATS configuration.
  4. Replace all instances of localtest.me with your actual domain names.
  5. Pin specific image versions (e.g., weikio/backend:1.2.0) instead of tracking :dev.

Custom Domains

To swap in your own domains, update the Traefik labels on the relevant services. For example:

labels:
  - "traefik.http.routers.ui.rule=Host(`your-domain.com`)"

Data Backup

All the actual configuration and state live in the data volume. You can back it up without bringing the system down:

docker run --rm -v weikio_data:/data -v $(pwd):/backup alpine tar czf /backup/weikio-backup.tar.gz /data

Upgrading

If you are tracking tags like :latest or :dev, upgrading is a two-liner:

docker-compose pull
docker-compose up -d

Troubleshooting

Services Not Starting

If something is crash-looping, check its logs:

docker-compose logs backend

Network Issues

Verify Docker actually created the network:

docker network ls | grep weikio

Port Conflicts

If Docker complains that ports 8000 or 8080 are already in use by another app on your machine, just change the left side of the port mappings in your docker-compose.yml (e.g., "8081:80").

Disk Space

If things get weird, check if you’re out of disk space in your Docker volumes:

docker system df -v

What’s Next