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
This commit is contained in:
+71
@@ -0,0 +1,71 @@
|
||||
# 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
|
||||
```bash
|
||||
# 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
|
||||
```bash
|
||||
cd boc/backend
|
||||
go build -o boc
|
||||
./boc
|
||||
```
|
||||
Backend startar på port 9092.
|
||||
|
||||
### 3. Frontend
|
||||
```bash
|
||||
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)
|
||||
```nginx
|
||||
location /api/ {
|
||||
proxy_pass http://localhost:9092;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
```
|
||||
|
||||
### 5. Systemd service
|
||||
```bash
|
||||
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
|
||||
```bash
|
||||
export DATABASE_URL="postgres://amos:amos@localhost:5432/aamos?sslmode=disable"
|
||||
export JWT_SECRET="din-hemliga-nyckel-här"
|
||||
export PORT=9092
|
||||
```
|
||||
Reference in New Issue
Block a user