Files
boc/INSTALL.md
T
Bernt (LandveX AI) 67a69ab073 feat(boc): v1.0 - Complete Business Operations Center
- Go backend API with full CRUD for all modules
- Rust analytics service with parallel processing
- C runtime with POSIX shared memory IPC
- PostgreSQL schema with 30+ tables
- Redis cache, Kafka event streaming
- WebSocket hub, automation engine
- PDF generation, Resend email integration
- JWT auth, multi-tenant
- Docker Compose deployment
- Nginx reverse proxy

Refs: BOC-001
2026-07-12 13:21:10 +00:00

1.4 KiB

BOC — Business Operations Center

Installationsguide

Systemkrav

  • Linux-server (Ubuntu 22.04+ rekommenderas)
  • PostgreSQL 14+
  • Go 1.21+
  • Node.js 18+ (för bygg)
  • AWS CLI (för S3/CloudFront deploy)

1. Databas

# Skapa databas
sudo -u postgres psql -c "CREATE DATABASE aamos;"
sudo -u postgres psql -c "CREATE USER amos WITH PASSWORD 'amos';"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE aamos TO amos;"

2. Backend

cd boc/backend
go build -o boc
./boc

Backend startar på port 9092.

3. Frontend

cd boc/web
# Kopiera till S3
aws s3 sync . s3://landvex-prod/boc/ --delete
# Invalidera CloudFront
aws cloudfront create-invalidation --distribution-id E2M3J95HLUR89H --paths "/boc/*"

4. Nginx (valfritt)

location /api/ {
    proxy_pass http://localhost:9092;
    proxy_set_header Host $host;
}

5. Systemd service

sudo tee /etc/systemd/system/boc.service << 'EOF'
[Unit]
Description=BOC Backend
After=network.target

[Service]
Type=simple
User=bernt
WorkingDirectory=/home/bernt/.openclaw/workspace/boc/backend
ExecStart=/home/bernt/.openclaw/workspace/boc/backend/boc
Restart=always

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl enable boc
sudo systemctl start boc

Miljövariabler

export DATABASE_URL="postgres://amos:amos@localhost:5432/aamos?sslmode=disable"
export JWT_SECRET="din-hemliga-nyckel-här"
export PORT=9092