Multi-Tenant & Customer VM Deployment Reference¶
This specification defines the canonical, artifact-driven installation standards for deploying the platform on customer virtual machines or clean nodes.
1. Unified Customer docker-compose.yml¶
This compose file is all a customer VM needs to execute our stack. It pulls pre-built versioned Docker images directly from the GitLab Container Registry.
version: '3.8'
services:
caddy:
image: caddy:2-alpine
container_name: bluefly-caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
networks:
- bluefly-net
gascity:
image: registry.gitlab.com/blueflyio/blu/city:latest
container_name: bluefly-gascity
restart: unless-stopped
environment:
- NODE_ENV=production
- CITY_CONFIG_PATH=/etc/bluefly/city.toml
volumes:
- /etc/bluefly/city.toml:/etc/bluefly/city.toml:ro
- gascity-state:/var/lib/bluefly
networks:
- bluefly-net
openclaw:
image: registry.gitlab.com/blueflyio/blu/openclaw:latest
container_name: bluefly-openclaw
restart: unless-stopped
environment:
- OPENCLAW_PORT=8080
networks:
- bluefly-net
networks:
bluefly-net:
driver: bridge
volumes:
caddy_data:
caddy_config:
gascity-state:
2. Canonical Configuration /etc/bluefly/city.toml¶
Every node has a single configuration file at /etc/bluefly/city.toml to customize identity and properties without touching code:
[node]
id = "customer-node-001"
name = "Primary Customer Runtime"
environment = "production"
[gascity]
api_port = 9000
storage_root = "/var/lib/bluefly/gascity"
[openclaw]
enabled = true
endpoint = "http://openclaw:8080"
[security]
redact_secrets = true
allow_unverified_pulls = false
3. Customer VM Bootstrap Script (bootstrap.sh)¶
A single script that customer administrators run to provision the environment:
#!/usr/bin/env bash
set -euo pipefail
echo "=========================================="
echo " Starting Bluefly Runtime Bootstrapper "
echo "=========================================="
# 1. Update OS and install dependencies
sudo apt-get update && sudo apt-get install -y curl gnupg2 ca-certificates lsb-release
# 2. Install Docker if missing
if ! command -v docker &> /dev/null; then
echo "Installing Docker..."
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker "$USER"
fi
# 3. Create canonical runtime folders
sudo mkdir -p /etc/bluefly
sudo mkdir -p /var/lib/bluefly
sudo chown -R "$USER:$USER" /etc/bluefly /var/lib/bluefly
# 4. Generate template city.toml
if [ ! -f /etc/bluefly/city.toml ]; then
cat << 'EOF' > /etc/bluefly/city.toml
[node]
id = "auto-generated-node"
environment = "production"
[gascity]
api_port = 9000
storage_root = "/var/lib/bluefly/gascity"
EOF
fi
echo "=========================================="
echo " Bootstrapping Complete. "
echo " Write your config to /etc/bluefly/city.toml "
echo " and run 'docker compose up -d' "
echo "=========================================="