Docker Compose Setup
Deploy Weik.io using Docker Compose
Deploy Weik.io on your own infrastructure using Docker Compose.
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 includes six services:
- Traefik - Reverse proxy and load balancer
- NATS - Messaging and event streaming
- Backend - Core API and business logic
- UI - Web interface
- Agent - Integration flow execution engine
- APIM - API Management gateway
Quick Start
1. Create Docker Compose File
Create a docker-compose.yml file with the following content:
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
Check that all services are running:
docker-compose ps
All services should show as “Up” or “healthy”.
4. Access Weik.io
Access the platform at:
- UI - http://weikio.localtest.me:8000
- API Gateway - http://api.localtest.me:8000
- Backend API - http://backend.localtest.me:8000
- Traefik Dashboard - http://localhost:8080
Default credentials:
- Username:
dev@weik.io - Password:
password - API Key:
api.key
Configuration
Environment Variables
The default configuration uses development settings. For production:
Backend Service:
ASPNETCORE_ENVIRONMENT- Set toProductionWeikio__Identity__LocalIdentity__Username- Admin usernameWeikio__Identity__LocalIdentity__Password- Strong passwordWeikio__Identity__LocalIdentity__ApiKey- Secure API key
Security for Production
Before deploying to production:
- Change default credentials in backend service
- Configure Traefik with TLS certificates for HTTPS
- Add authentication to NATS
- Replace
localtest.mewith your actual domains - Use specific image versions instead of
:devtag
Custom Domains
Update Traefik labels to use your domains:
labels:
- "traefik.http.routers.ui.rule=Host(`your-domain.com`)"
Data Backup
All application data is stored in the data volume. Back up data using:
docker run --rm -v weikio_data:/data -v $(pwd):/backup alpine tar czf /backup/weikio-backup.tar.gz /data
Upgrading
Pull latest images and restart services:
docker-compose pull
docker-compose up -d
Troubleshooting
Services Not Starting
View logs for a specific service:
docker-compose logs backend
Network Issues
Verify the Docker network exists:
docker network ls | grep weikio
Port Conflicts
If ports 8000 or 8080 are in use, modify port mappings in docker-compose.yml.
Disk Space
Check data volume disk usage:
docker system df -v
What’s Next
- Quickstart - Create your first integration
- Integration Flows - Learn about integrations
- API Management - Configure API gateway
- Eventing - Set up event streaming