fix: add go.sum and fixes
This commit is contained in:
123
docker-compose.yml
Normal file
123
docker-compose.yml
Normal file
@@ -0,0 +1,123 @@
|
||||
version: '3.8'
|
||||
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
# 🐍 OPHION - Docker Compose
|
||||
# Observability Platform with ClickHouse, PostgreSQL, Redis
|
||||
# ═══════════════════════════════════════════════════════════
|
||||
|
||||
services:
|
||||
# ─────────────────────────────────────────────────────────
|
||||
# OPHION Server (Go API)
|
||||
# ─────────────────────────────────────────────────────────
|
||||
server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: deploy/docker/Dockerfile.server
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- PORT=8080
|
||||
- DATABASE_URL=postgres://ophion:ophion@postgres:5432/ophion?sslmode=disable
|
||||
- CLICKHOUSE_URL=clickhouse://default:@clickhouse:9000/ophion
|
||||
- REDIS_URL=redis://redis:6379
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
clickhouse:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- ophion
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
# ─────────────────────────────────────────────────────────
|
||||
# OPHION Dashboard (Next.js)
|
||||
# ─────────────────────────────────────────────────────────
|
||||
dashboard:
|
||||
build:
|
||||
context: ./dashboard
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- NEXT_PUBLIC_API_URL=http://server:8080
|
||||
- NODE_ENV=production
|
||||
depends_on:
|
||||
- server
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- ophion
|
||||
|
||||
# ─────────────────────────────────────────────────────────
|
||||
# PostgreSQL (Metadata, Users, Alerts)
|
||||
# ─────────────────────────────────────────────────────────
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: ophion
|
||||
POSTGRES_PASSWORD: ophion
|
||||
POSTGRES_DB: ophion
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- ophion
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ophion"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# ─────────────────────────────────────────────────────────
|
||||
# ClickHouse (Metrics, Traces, Logs)
|
||||
# ─────────────────────────────────────────────────────────
|
||||
clickhouse:
|
||||
image: clickhouse/clickhouse-server:24.1
|
||||
ports:
|
||||
- "9000:9000" # Native protocol
|
||||
- "8123:8123" # HTTP interface
|
||||
volumes:
|
||||
- clickhouse_data:/var/lib/clickhouse
|
||||
- ./configs/clickhouse:/etc/clickhouse-server/config.d
|
||||
environment:
|
||||
- CLICKHOUSE_DB=ophion
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- ophion
|
||||
healthcheck:
|
||||
test: ["CMD", "clickhouse-client", "--query", "SELECT 1"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# ─────────────────────────────────────────────────────────
|
||||
# Redis (Cache, Pub/Sub)
|
||||
# ─────────────────────────────────────────────────────────
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- ophion
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
ophion:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
clickhouse_data:
|
||||
redis_data:
|
||||
Reference in New Issue
Block a user