# ============================================================================== # 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 chat-server stream-server web haproxy INFRA_SERVICES := postgres redis rabbitmq # --- Service → Directory mapping (customize paths here) SERVICE_DIR_backend-api := veza-backend-api SERVICE_DIR_chat-server := veza-chat-server 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_chat-server ?= 3000 PORT_stream-server ?= 3001 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 # Legacy names for backward compatibility PORT_GO ?= $(PORT_backend-api) PORT_CHAT ?= $(PORT_chat-server) PORT_STREAM ?= $(PORT_stream-server) 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