veza/make/config.mk
senke 73eca4f6ad feat: backend, stream server & infra improvements
Backend (Go):
- Config: CORS, RabbitMQ, rate limit, main config updates
- Routes: core, distribution, tracks routing changes
- Middleware: rate limiter, endpoint limiter, response cache hardening
- Handlers: distribution, search handler fixes
- Workers: job worker improvements
- Upload validator and logging config additions
- New migrations: products, orders, performance indexes
- Seed tooling and data

Stream Server (Rust):
- Audio processing, config, routes, simple stream server updates
- Dockerfile improvements

Infrastructure:
- docker-compose.yml updates
- nginx-rtmp config changes
- Makefile improvements (config, dev, high, infra)
- Root package.json and lock file updates
- .env.example updates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 11:36:06 +01:00

77 lines
2.5 KiB
Makefile

# ==============================================================================
# VEZA MONOREPO - CONFIGURATION (single source of truth)
# ==============================================================================
# Edit this file to add services, change ports, or paths.
# Override via .env or environment (e.g. PORT_WEB=3000 make dev).
# ==============================================================================
-include .env
# --- Project ---
PROJECT_NAME ?= veza
ROOT ?= $(CURDIR)
# --- Compose ---
COMPOSE_FILE ?= docker-compose.yml
COMPOSE_PROD ?= docker-compose.prod.yml
# --- Services (space-separated; must match keys in SERVICE_DIRS / SERVICE_PORTS)
SERVICES := backend-api stream-server web haproxy
INFRA_SERVICES := postgres redis rabbitmq
# --- Service → Directory mapping (customize paths here)
SERVICE_DIR_backend-api := veza-backend-api
SERVICE_DIR_stream-server := veza-stream-server
SERVICE_DIR_web := apps/web
SERVICE_DIR_haproxy :=
# --- Ports (override with PORT_* from .env)
# Defaults use 18xxx range to avoid conflicts with other projects on same machine
PORT_backend-api ?= 18080
PORT_stream-server ?= 18082
PORT_web ?= 5173
PORT_haproxy ?= 80
# Infra (docker-compose dev)
PORT_POSTGRES ?= 15432
PORT_REDIS ?= 16379
PORT_RABBITMQ_AMQP ?= 15672
PORT_RABBITMQ_MGMT ?= 25672
PORT_BACKEND ?= 18080
# Exposed host port for Stream (Docker dev)
PORT_STREAM ?= 18082
# Legacy names for backward compatibility
PORT_GO ?= $(PORT_backend-api)
PORT_WEB ?= $(PORT_web)
PORT_HAPROXY ?= $(PORT_haproxy)
# --- Domain (single source of truth — override via APP_DOMAIN=... env) ---
APP_DOMAIN ?= veza.fr
# --- Database & Infra ---
# Host ports when using docker-compose (override in .env if needed)
DB_USER ?= veza
DB_PASS ?= password
DB_NAME ?= veza
DB_HOST ?= $(APP_DOMAIN)
DB_PORT ?= $(PORT_POSTGRES)
# Connection strings for backend running on host connecting to Docker infra
# In Docker: backend uses postgres:5432, redis:6379, rabbitmq:5672 (internal)
# On host: use mapped ports from env (15432, 16379, 15672)
DATABASE_URL = postgres://$(DB_USER):$(DB_PASS)@$(DB_HOST):$(DB_PORT)/$(DB_NAME)?sslmode=disable
REDIS_URL = redis://$(APP_DOMAIN):$(PORT_REDIS)
AMQP_URL = amqp://$(DB_USER):$(DB_PASS)@$(APP_DOMAIN):$(PORT_RABBITMQ_AMQP)/
# --- Incus ---
DEPLOY_TARGET ?= docker
INCUS_PROFILE ?= veza-profile
INCUS_NETWORK ?= veza-network
INCUS_SCRIPTS ?= $(ROOT)/config/incus
# --- NPM workspaces (from root package.json; used for install-deps / lint scope)
NPM_WORKSPACES ?= apps/web packages/design-system
# --- Scripts ---
SCRIPTS ?= $(ROOT)/scripts