feat: enhance evobgp with new command-line tools for bundle management, including pull, verify, and apply functionalities. Update go.mod to include necessary dependencies and complete todos in architecture plan for improved observability and deployment practices.
CI / changes (push) Successful in 4s
CI / go (push) Failing after 6s
CI / bird2 (push) Has been skipped
CI / openapi (push) Has been skipped

This commit is contained in:
Denozordec
2026-04-05 14:07:45 +07:00
parent 272542b92a
commit bf52b21150
131 changed files with 9222 additions and 17 deletions
+193
View File
@@ -0,0 +1,193 @@
# EvoBGP Compose: профили `reference` (эталон) и `microvps` (одна VPS).
#
# Запуск:
# docker compose --profile reference up -d --build
# docker compose --profile microvps up -d --build
#
# Профиль reference: Web UI на http://localhost:3000 (nginx → /v1 и /metrics на evobgp-api:8080).
#
# Очистка неиспользуемых данных Docker (PowerShell; осторожно с -v):
# docker system prune -f
# docker volume prune -f
#
# Входящий BGP (TCP/179): на Linux для публичного пира часто нужен network_mode: host у bird2
# или macvlan/ipvlan — см. архитектурный план §4.1. Здесь опубликован порт 179 для отладки.
name: evobgp
x-logging: &default-logging
driver: json-file
options:
max-size: "10m"
max-file: "3"
services:
postgres:
profiles: ["reference", "microvps"]
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: evobgp
POSTGRES_PASSWORD: evobgp
POSTGRES_DB: evobgp
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U evobgp -d evobgp"]
interval: 10s
timeout: 5s
retries: 5
logging: *default-logging
deploy:
resources:
limits:
cpus: "1.0"
memory: 384M
evobgp-api:
profiles: ["reference"]
build:
context: ../..
dockerfile: deploy/docker/gobinary/Dockerfile
args:
BIN: evobgp-api
INSTALL_BIRDC: "1"
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
bird2:
condition: service_started
ports:
- "8080:8080"
environment:
EVOBGP_HTTP_ADDR: ":8080"
EVOBGP_SEED_DEMO: "1"
EVOBGP_BIRDC_SOCKET: /run/bird/bird.ctl
EVOBGP_BIRDC_INTERVAL: 30s
# Для прямого доступа к API с dev-сервера Vite (порт 5173); в Docker UI трафик идёт через evobgp-web proxy.
EVOBGP_CORS_ORIGINS: "http://localhost:5173,http://127.0.0.1:5173,http://localhost:3000,http://127.0.0.1:3000"
volumes:
- bird_run:/run/bird:ro
logging: *default-logging
deploy:
resources:
limits:
cpus: "1.0"
memory: 512M
evobgp-web:
profiles: ["reference"]
build:
context: ../..
dockerfile: deploy/docker/evobgp-web/Dockerfile
restart: unless-stopped
depends_on:
- evobgp-api
ports:
- "3000:80"
logging: *default-logging
deploy:
resources:
limits:
cpus: "0.5"
memory: 128M
evobgp-all:
profiles: ["microvps"]
build:
context: ../..
dockerfile: deploy/docker/gobinary/Dockerfile
args:
BIN: evobgp-all
INSTALL_BIRDC: "1"
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
bird2:
condition: service_started
ports:
- "8080:8080"
environment:
EVOBGP_HTTP_ADDR: ":8080"
EVOBGP_SEED_DEMO: "1"
EVOBGP_BIRDC_SOCKET: /run/bird/bird.ctl
EVOBGP_BIRDC_INTERVAL: 30s
volumes:
- bird_run:/run/bird:ro
logging: *default-logging
deploy:
resources:
limits:
cpus: "1.0"
memory: 512M
bird2:
profiles: ["reference", "microvps"]
build:
context: ../..
dockerfile: deploy/docker/bird2/Dockerfile
restart: unless-stopped
cap_add:
- NET_ADMIN
sysctls:
net.ipv4.ip_forward: "1"
net.ipv6.conf.all.forwarding: "1"
volumes:
- bird_etc:/etc/bird
- bird_run:/run/bird
ports:
- "179:179/tcp"
logging: *default-logging
deploy:
resources:
limits:
memory: 256M
evobgp-agent:
profiles: ["reference", "microvps"]
build:
context: ../..
dockerfile: deploy/docker/evobgp-agent/Dockerfile
restart: unless-stopped
depends_on:
- bird2
cap_add:
- NET_ADMIN
volumes:
- bird_etc:/etc/bird
- bird_run:/run/bird
entrypoint: ["/bin/sh", "-c"]
command: ["sleep infinity"]
logging: *default-logging
deploy:
resources:
limits:
memory: 128M
prometheus:
profiles: ["reference"]
image: prom/prometheus:v2.54.1
restart: unless-stopped
depends_on:
- evobgp-api
ports:
- "9090:9090"
volumes:
- ../prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ../prometheus/alerts.yml:/etc/prometheus/alerts.yml:ro
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=15d
- --web.enable-lifecycle
logging: *default-logging
deploy:
resources:
limits:
memory: 512M
volumes:
pgdata:
bird_etc:
bird_run: