From aa58b38e8ccfe4f8016e36bc82c4e5a9c0e7c1e1 Mon Sep 17 00:00:00 2001 From: Guilherme Gomes Date: Sat, 29 Aug 2026 10:34:58 -0300 Subject: [PATCH] chore: drop the internal review stack from the repo Review lives on the board, not in the repository. Removes internal/ and untangles the two CHANGELOG references and the nginx README paragraph that described the gateway defaults in terms of that stack. --- CHANGELOG.md | 5 +- internal/review/README.md | 67 ------ internal/review/docker-compose.yml | 324 ----------------------------- internal/review/review.sh | 100 --------- nginx/README.md | 9 +- 5 files changed, 5 insertions(+), 500 deletions(-) delete mode 100644 internal/review/README.md delete mode 100644 internal/review/docker-compose.yml delete mode 100755 internal/review/review.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 749024d2..0c84a2cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -121,7 +121,7 @@ The largest release-candidate window of the cycle (~5 weeks since rc5, ~300 comm Also headline-worthy: **agent conversation memory restored** — the bot-runtime was keying ADK sessions on numeric display ids instead of UUIDs, so the agent answered every message from scratch ("404/500 Session not found"); it now sends the conversation UUID as `contextId` and the contact UUID as `userId`. New capabilities include a full **SendGrid email channel** (EVO-1248–1251, EVO-1721), **B14 CRM Lead Capture** (form-builder + chat pages + public pages, EVO-1771), **conversations history import** (EVO-1557), **products CSV bulk import with dry-run** (EVO-1555, EVO-1736, EVO-1783), a **Segments drag-drop canvas builder** routed through the CRM proxy (EVO-1247, EVO-1569), and six pipeline-oriented Journey nodes/triggers behind a pre-activation validation framework (EVO-1744, EVO-1742, EVO-1273/1272/1265/1257/1256/1266). -On the umbrella itself: swarm/prod-test parity fixes (EVO-1966 — local storage, processor password, gateway media, healthchecks for evo_crm/evo-core/evo-frontend, guaranteed bring-up from a clean checkout), a per-PR review environment (`internal/review/review.sh` + `:pr-N` image builds across all services, EVO-1998), compose/env fixes (`VITE_EVOFLOW_API_URL` for the frontend EVO-1906, `EVO_AUTH_BASE_URL` for the processor EVO-1683, Temporal healthcheck EVO-1755), and a **new submodule**: `evo-flow-community` with a local evo-flow + ClickHouse stack for event tracking (EVO-1571). +On the umbrella itself: swarm/prod-test parity fixes (EVO-1966 — local storage, processor password, gateway media, healthchecks for evo_crm/evo-core/evo-frontend, guaranteed bring-up from a clean checkout), compose/env fixes (`VITE_EVOFLOW_API_URL` for the frontend EVO-1906, `EVO_AUTH_BASE_URL` for the processor EVO-1683, Temporal healthcheck EVO-1755), and a **new submodule**: `evo-flow-community` with a local evo-flow + ClickHouse stack for event tracking (EVO-1571). ### Submodules updated @@ -156,8 +156,7 @@ On the umbrella itself: swarm/prod-test parity fixes (EVO-1966 — local storage ### Repository housekeeping -- New per-PR review environment: `prod-test` was refactored into `internal/review` with PR-parameterized image tags, plus `internal/review/review.sh` which takes a PR link, adjusts the image and brings up the stack (EVO-1998). -- `evo-assistant` added to `.gitignore`; EVO-1354 review rounds A/B/C documented. +- `evo-assistant` added to `.gitignore`. - Footer links: this release adds the previously missing `[v1.0.0-rc5]` compare link and repoints `[Unreleased]` (it had been left at `v1.0.0-rc4...HEAD` since rc5). ## [v1.0.0-rc5] - 2026-05-27 diff --git a/internal/review/README.md b/internal/review/README.md deleted file mode 100644 index e39bb378..00000000 --- a/internal/review/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# Review environment (internal team tooling) - -**Not** part of the self-host quick start — self-hosters use the root -`docker-compose.yml` (`make setup`). This stack exists to **test a card's PRs -running**: it pulls the published Docker Hub images and lets you pin one (or -several) services to a PR image while the rest run `:develop`. - -## Image tags - -| env var | service | default | -|-----------------|--------------------------------|-----------| -| `CRM_TAG` | evo-ai-crm-community | `develop` | -| `AUTH_TAG` | evo-auth-service-community | `develop` | -| `CORE_TAG` | evo-ai-core-service-community | `develop` | -| `PROCESSOR_TAG` | evo-ai-processor-community | `develop` | -| `BOT_TAG` | evo-bot-runtime | `develop` | -| `FRONTEND_TAG` | evo-ai-frontend-community | `develop` | - -PR images (`:pr-`) are published by each service's CI on `pull_request` -(see the service repo's `.github/workflows/docker-publish.yml`). - -## Quick use — `review.sh` - -Pass one or more PR URLs; each pins its service to `:pr-`, all other services -run `:develop`, then the stack comes up: - -```sh -# one PR: -./internal/review/review.sh https://github.com/evolution-foundation/evo-ai-crm-community/pull/140 -# a card with several PRs — just pass all the links: -./internal/review/review.sh -# dry-run (prints what it would do, boots nothing): -./internal/review/review.sh -n -# baseline (no args → every service on :develop): -./internal/review/review.sh -``` - -`review.sh` is the intended entry point. The raw `docker compose` commands below -are the plumbing it drives. - -## Usage (plumbing) - -Run from the repo root: - -```sh -# whole develop line (baseline): -BACKEND_URL=http://host.docker.internal:3030 \ -FRONTEND_URL=http://host.docker.internal:5173 \ - docker compose -f internal/review/docker-compose.yml up -d - -# review CRM PR #140 against the rest of develop: -CRM_TAG=pr-140 \ -BACKEND_URL=http://host.docker.internal:3030 \ -FRONTEND_URL=http://host.docker.internal:5173 \ - docker compose -f internal/review/docker-compose.yml up -d - -# tear down (and wipe volumes): -docker compose -f internal/review/docker-compose.yml down -v -``` - -`BACKEND_URL`/`FRONTEND_URL` must be **non-localhost** (the CRM refuses to boot -in production mode with localhost). On Mac/Windows `host.docker.internal` works; -on Linux use the host LAN IP or add an `extra_hosts` mapping. - -> The card→PRs resolution (which PR maps to which `_TAG`) is done by Claude -> via the Linear MCP — see the `review-card` / `evo-code-review` skills. This -> compose only consumes the tags. Tracking: **EVO-1998**. diff --git a/internal/review/docker-compose.yml b/internal/review/docker-compose.yml deleted file mode 100644 index 9e45ffb3..00000000 --- a/internal/review/docker-compose.yml +++ /dev/null @@ -1,324 +0,0 @@ -# ============================================================================= -# Evo CRM Community — Review environment (INTERNAL team tooling) -# ============================================================================= -# NOT part of the self-host quick start. Runs the published Docker Hub images -# as a full local stack so a reviewer can TEST a card's changes running. -# See internal/review/README.md. -# -# The image tag of each service is overridable via env: -# - no override → every service runs :develop (the review baseline) -# - _TAG=pr- → pins that service to its PR image (:pr-N) -# tag vars: CRM_TAG, AUTH_TAG, CORE_TAG, PROCESSOR_TAG, BOT_TAG, FRONTEND_TAG -# -# RAILS_ENV=production, so BACKEND_URL and FRONTEND_URL must be non-localhost -# (the CRM refuses to boot in production with localhost). On Mac/Windows, -# host.docker.internal works; on Linux use the host LAN IP or extra_hosts. -# -# Example — review CRM PR #140 against the rest of develop: -# CRM_TAG=pr-140 \ -# BACKEND_URL=http://host.docker.internal:3030 \ -# FRONTEND_URL=http://host.docker.internal:5173 \ -# docker compose -f internal/review/docker-compose.yml up -d -# docker compose -f internal/review/docker-compose.yml down -v -# ============================================================================= - -services: - - # --------------------------------------------------------------------------- - # Infrastructure - # --------------------------------------------------------------------------- - evo_postgres: - image: pgvector/pgvector:pg16 - ports: - - "5432:5432" - volumes: - - evo_postgres_data:/var/lib/postgresql/data - environment: - POSTGRES_DB: evo_community - POSTGRES_USER: postgres - POSTGRES_PASSWORD: evoai_dev_password - healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] - interval: 5s - timeout: 5s - retries: 10 - start_period: 10s - - evo_redis: - image: redis:alpine - ports: - - "6379:6379" - command: ["sh", "-c", "redis-server --requirepass evoai_redis_pass --appendonly yes"] - volumes: - - evo_redis_data:/data - healthcheck: - test: ["CMD", "redis-cli", "-a", "evoai_redis_pass", "ping"] - interval: 5s - timeout: 5s - retries: 10 - - # --------------------------------------------------------------------------- - # API Gateway (Nginx) — Port 3030 - # --------------------------------------------------------------------------- - evo_gateway: - build: - context: ../../nginx - dockerfile: Dockerfile - ports: - - "3030:3030" - depends_on: - evo_auth: - condition: service_healthy - evo_crm: - condition: service_healthy - - # --------------------------------------------------------------------------- - # Auth Service (Ruby / Rails) — Port 3001 - # --------------------------------------------------------------------------- - evo_auth: - image: evoapicloud/evo-auth-service-community:${AUTH_TAG:-develop} - command: sh -c "bundle exec rails db:prepare && bundle exec rails s -p 3001 -b 0.0.0.0" - ports: - - "3001:3001" - environment: - RAILS_ENV: production - RAILS_MAX_THREADS: 5 - SECRET_KEY_BASE: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - JWT_SECRET_KEY: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - EVOAI_CRM_API_TOKEN: 6e10e689-58ce-4416-bf0d-f5818bf2dcf8 - POSTGRES_HOST: evo_postgres - POSTGRES_PORT: "5432" - POSTGRES_USERNAME: postgres - POSTGRES_PASSWORD: evoai_dev_password - POSTGRES_DATABASE: evo_community - REDIS_URL: redis://:evoai_redis_pass@evo_redis:6379/1 - FRONTEND_URL: "${FRONTEND_URL:?FRONTEND_URL must be set to a non-localhost URL for the review env (e.g. http://host.docker.internal:5173)}" - MAILER_SENDER_EMAIL: noreply@evoai.local - DOORKEEPER_JWT_SECRET_KEY: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - DOORKEEPER_JWT_ALGORITHM: hs256 - DOORKEEPER_JWT_ISS: evo-auth-service - MFA_ISSUER: EvoAI - SIDEKIQ_CONCURRENCY: 10 - ACTIVE_STORAGE_SERVICE: local - depends_on: - evo_postgres: - condition: service_healthy - evo_redis: - condition: service_healthy - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:3001/health"] - interval: 30s - timeout: 10s - retries: 5 - start_period: 90s - - evo_auth_sidekiq: - image: evoapicloud/evo-auth-service-community:${AUTH_TAG:-develop} - command: sh -c "bundle exec sidekiq" - # Disable inherited HTTP healthcheck — Sidekiq has no web server. - healthcheck: - disable: true - environment: - RAILS_ENV: production - SECRET_KEY_BASE: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - JWT_SECRET_KEY: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - EVOAI_CRM_API_TOKEN: 6e10e689-58ce-4416-bf0d-f5818bf2dcf8 - POSTGRES_HOST: evo_postgres - POSTGRES_PORT: "5432" - POSTGRES_USERNAME: postgres - POSTGRES_PASSWORD: evoai_dev_password - POSTGRES_DATABASE: evo_community - REDIS_URL: redis://:evoai_redis_pass@evo_redis:6379/1 - SIDEKIQ_CONCURRENCY: 10 - depends_on: - evo_postgres: - condition: service_healthy - evo_redis: - condition: service_healthy - - # --------------------------------------------------------------------------- - # CRM Service (Ruby / Rails) — Port 3000 - # --------------------------------------------------------------------------- - evo_crm: - image: evoapicloud/evo-ai-crm-community:${CRM_TAG:-develop} - command: sh -c "bundle exec rails db:prepare && bundle exec rails s -p 3000 -b 0.0.0.0" - ports: - - "3000:3000" - environment: - RAILS_ENV: production - RAILS_SERVE_STATIC_FILES: "true" - RAILS_LOG_TO_STDOUT: "true" - SECRET_KEY_BASE: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - JWT_SECRET_KEY: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - EVOAI_CRM_API_TOKEN: 6e10e689-58ce-4416-bf0d-f5818bf2dcf8 - POSTGRES_HOST: evo_postgres - POSTGRES_PORT: "5432" - POSTGRES_USERNAME: postgres - POSTGRES_PASSWORD: evoai_dev_password - POSTGRES_DATABASE: evo_community - REDIS_URL: redis://:evoai_redis_pass@evo_redis:6379/0 - EVO_AUTH_SERVICE_URL: http://evo_auth:3001 - EVO_AI_CORE_SERVICE_URL: http://evo_core:5555 - BACKEND_URL: "${BACKEND_URL:?BACKEND_URL must be set to a non-localhost URL for the review env (e.g. http://host.docker.internal:3030)}" - FRONTEND_URL: "${FRONTEND_URL:?FRONTEND_URL must be set to a non-localhost URL for the review env (e.g. http://host.docker.internal:5173)}" - # CORS origins are the browser's Origin header (Vite serves on localhost:5173 from the host machine); - # they are independent of BACKEND_URL/FRONTEND_URL which are CRM-side URLs. - CORS_ORIGINS: "${CORS_ORIGINS:-http://localhost:5173,http://localhost:3030}" - DISABLE_TELEMETRY: "true" - LOG_LEVEL: info - ENABLE_ACCOUNT_SIGNUP: "true" - ENABLE_PUSH_RELAY_SERVER: "true" - ENABLE_INBOX_EVENTS: "true" - BOT_RUNTIME_URL: http://evo_bot_runtime:8080 - BOT_RUNTIME_SECRET: evo-bot-runtime-dev-secret - BOT_RUNTIME_POSTBACK_BASE_URL: http://evo_crm:3000 - depends_on: - evo_postgres: - condition: service_healthy - evo_redis: - condition: service_healthy - evo_auth: - condition: service_healthy - healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/health/live"] - interval: 30s - timeout: 10s - retries: 5 - start_period: 120s - - evo_crm_sidekiq: - image: evoapicloud/evo-ai-crm-community:${CRM_TAG:-develop} - command: ["bundle", "exec", "sidekiq", "-C", "config/sidekiq.yml"] - # Disable inherited HTTP healthcheck — Sidekiq has no web server. - healthcheck: - disable: true - environment: - RAILS_ENV: production - SECRET_KEY_BASE: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - JWT_SECRET_KEY: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - EVOAI_CRM_API_TOKEN: 6e10e689-58ce-4416-bf0d-f5818bf2dcf8 - POSTGRES_HOST: evo_postgres - POSTGRES_PORT: "5432" - POSTGRES_USERNAME: postgres - POSTGRES_PASSWORD: evoai_dev_password - POSTGRES_DATABASE: evo_community - REDIS_URL: redis://:evoai_redis_pass@evo_redis:6379/0 - EVO_AUTH_SERVICE_URL: http://evo_auth:3001 - EVO_AI_CORE_SERVICE_URL: http://evo_core:5555 - BOT_RUNTIME_URL: http://evo_bot_runtime:8080 - BOT_RUNTIME_SECRET: evo-bot-runtime-dev-secret - BOT_RUNTIME_POSTBACK_BASE_URL: http://evo_crm:3000 - depends_on: - evo_postgres: - condition: service_healthy - evo_redis: - condition: service_healthy - - # --------------------------------------------------------------------------- - # Core Service (Go / Gin) — Port 5555 - # --------------------------------------------------------------------------- - evo_core: - image: evoapicloud/evo-ai-core-service-community:${CORE_TAG:-develop} - ports: - - "5555:5555" - environment: - DB_HOST: evo_postgres - DB_PORT: "5432" - DB_USER: postgres - DB_PASSWORD: evoai_dev_password - DB_NAME: evo_community - DB_SSLMODE: disable - DB_MAX_IDLE_CONNS: 10 - DB_MAX_OPEN_CONNS: 100 - DB_CONN_MAX_LIFETIME: 1h - DB_CONN_MAX_IDLE_TIME: 30m - PORT: "5555" - SECRET_KEY_BASE: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - JWT_SECRET_KEY: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - JWT_ALGORITHM: HS256 - ENCRYPTION_KEY: XoQPOBw2FrzjQS11utERG9qO2MsAnXFxlhIns_uUxRk= - EVOLUTION_BASE_URL: http://evo_crm:3000 - EVO_AUTH_BASE_URL: http://evo_auth:3001 - AI_PROCESSOR_URL: http://evo_processor:8000 - AI_PROCESSOR_VERSION: v1 - depends_on: - evo_postgres: - condition: service_healthy - - # --------------------------------------------------------------------------- - # Processor Service (Python / FastAPI) — Port 8000 - # --------------------------------------------------------------------------- - evo_processor: - image: evoapicloud/evo-ai-processor-community:${PROCESSOR_TAG:-develop} - ports: - - "8000:8000" - environment: - POSTGRES_CONNECTION_STRING: postgresql://postgres:evoai_dev_password@evo_postgres:5432/evo_community - REDIS_HOST: evo_redis - REDIS_PORT: "6379" - REDIS_PASSWORD: evoai_redis_pass - REDIS_SSL: "false" - REDIS_DB: 0 - REDIS_KEY_PREFIX: "a2a:" - REDIS_TTL: 3600 - HOST: 0.0.0.0 - PORT: "8000" - DEBUG: "false" - SECRET_KEY_BASE: "a]i9F#k2$$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1" - ENCRYPTION_KEY: XoQPOBw2FrzjQS11utERG9qO2MsAnXFxlhIns_uUxRk= - EVOAI_CRM_API_TOKEN: 6e10e689-58ce-4416-bf0d-f5818bf2dcf8 - EVO_AI_CRM_URL: http://evo_crm:3000 - EVO_AUTH_BASE_URL: http://evo_auth:3001 - CORE_SERVICE_URL: http://evo_core:5555/api/v1 - APP_URL: http://localhost:8000 - API_TITLE: Agent Processor Community - API_DESCRIPTION: Agent Processor Community for Evo AI - API_VERSION: 1.0.0 - API_URL: http://localhost:8000 - ORGANIZATION_NAME: Evo AI - TOOLS_CACHE_ENABLED: "true" - TOOLS_CACHE_TTL: 3600 - volumes: - - evo_processor_logs:/app/logs - depends_on: - evo_postgres: - condition: service_healthy - evo_redis: - condition: service_healthy - - # --------------------------------------------------------------------------- - # Bot Runtime (Go / Gin) — Port 8080 - # --------------------------------------------------------------------------- - evo_bot_runtime: - image: evoapicloud/evo-bot-runtime:${BOT_TAG:-develop} - ports: - - "8080:8080" - environment: - LISTEN_ADDR: 0.0.0.0:8080 - REDIS_URL: redis://:evoai_redis_pass@evo_redis:6379 - AI_PROCESSOR_URL: http://evo_processor:8000 - BOT_RUNTIME_SECRET: evo-bot-runtime-dev-secret - AI_CALL_TIMEOUT_SECONDS: 30 - depends_on: - evo_redis: - condition: service_healthy - - # --------------------------------------------------------------------------- - # Frontend (React / Vite / Nginx) — Port 5173 - # --------------------------------------------------------------------------- - evo_frontend: - image: evoapicloud/evo-ai-frontend-community:${FRONTEND_TAG:-develop} - ports: - - "5173:80" - environment: - VITE_APP_ENV: production - VITE_API_URL: http://localhost:3030 - VITE_AUTH_API_URL: http://localhost:3030 - VITE_WS_URL: http://localhost:3030 - VITE_EVOAI_API_URL: http://localhost:3030 - VITE_AGENT_PROCESSOR_URL: http://localhost:3030 - -volumes: - evo_postgres_data: - evo_redis_data: - evo_processor_logs: diff --git a/internal/review/review.sh b/internal/review/review.sh deleted file mode 100755 index 5af626f0..00000000 --- a/internal/review/review.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env bash -# review — sobe a stack de review com um ou mais serviços fixados na imagem do seu PR. -# -# review [ ...] -# -# Cada URL de PR (https://github.com///pull/) fixa o serviço daquele -# repo em :pr-; todos os outros rodam :develop. Depois sobe a stack. -# -# Um card com vários PRs? Passe todos os links: o revisor copia do card. -# Sem argumentos = baseline (tudo em :develop). -# -# Flags: -# -n, --dry-run mostra o que rodaria (env + comando compose) sem subir nada. -# -# Exemplos: -# ./review.sh https://github.com/evolution-foundation/evo-ai-crm-community/pull/140 -# ./review.sh -# ./review.sh -n -set -euo pipefail - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -COMPOSE="$SCRIPT_DIR/docker-compose.yml" - -DRY_RUN=0 -declare -a URLS=() -for arg in "$@"; do - case "$arg" in - -n|--dry-run) DRY_RUN=1 ;; - -h|--help) sed -n '2,20p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'; exit 0 ;; - *) URLS+=("$arg") ;; - esac -done - -# repo do PR -> variável de tag do serviço no compose -repo_to_tagvar() { - case "$1" in - evo-ai-crm-community) echo "CRM_TAG" ;; - evo-auth-service-community) echo "AUTH_TAG" ;; - evo-ai-core-service-community) echo "CORE_TAG" ;; - evo-ai-processor-community) echo "PROCESSOR_TAG" ;; - evo-bot-runtime) echo "BOT_TAG" ;; - evo-ai-frontend-community) echo "FRONTEND_TAG" ;; - *) echo "" ;; - esac -} - -declare -a TAG_ENVS=() -declare -a SUMMARY=() - -for url in "${URLS[@]:-}"; do - [ -z "$url" ] && continue - if [[ "$url" =~ github\.com/[^/]+/([^/]+)/pull/([0-9]+) ]]; then - repo="${BASH_REMATCH[1]}"; num="${BASH_REMATCH[2]}" - else - echo "erro: não é URL de PR do GitHub: $url" >&2; exit 1 - fi - var="$(repo_to_tagvar "$repo")" - if [ -z "$var" ]; then - echo "erro: repo '$repo' não é um serviço da stack de review" >&2; exit 1 - fi - tag="pr-${num}" - img="evoapicloud/${repo}:${tag}" - if ! docker manifest inspect "$img" >/dev/null 2>&1; then - echo "aviso: imagem $img ainda não existe no registry — o build do PR já terminou?" >&2 - fi - TAG_ENVS+=("${var}=${tag}") - SUMMARY+=("${repo} → ${tag}") -done - -# URLs de review (não-localhost — o CRM recusa boot em produção com localhost) -export BACKEND_URL="${BACKEND_URL:-http://host.docker.internal:3030}" -export FRONTEND_URL="${FRONTEND_URL:-http://host.docker.internal:5173}" - -echo "Stack de review:" -if [ "${#SUMMARY[@]}" -eq 0 ]; then - echo " - (todos os serviços → develop)" -else - for s in "${SUMMARY[@]}"; do echo " - $s"; done - echo " - (demais serviços → develop)" -fi -echo - -if [ "$DRY_RUN" -eq 1 ]; then - echo "[dry-run] rodaria:" - echo " ${TAG_ENVS[*]} \\" - echo " BACKEND_URL=$BACKEND_URL FRONTEND_URL=$FRONTEND_URL \\" - echo " docker compose -f $COMPOSE up -d" - exit 0 -fi - -if [ "${#TAG_ENVS[@]}" -eq 0 ]; then - docker compose -f "$COMPOSE" up -d -else - env "${TAG_ENVS[@]}" docker compose -f "$COMPOSE" up -d -fi - -echo -echo "Gateway: $BACKEND_URL" -echo "Frontend: $FRONTEND_URL" -echo "Derrubar: docker compose -f $COMPOSE down -v" diff --git a/nginx/README.md b/nginx/README.md index 357afa15..6d063fef 100644 --- a/nginx/README.md +++ b/nginx/README.md @@ -22,12 +22,9 @@ Full path matrix is in [`default.conf.template`](./default.conf.template). ## Configurable upstreams Each of the five variables above is rendered at container start from an -environment variable. The defaults below (`evo_auth`, `evo_crm`, …) match the -underscore service names used by **`internal/review/docker-compose.yml`** (the -review environment), which is the only stack that runs this gateway against the -default hostnames. - -Two stacks do **not** match these defaults: +environment variable. The defaults below use underscore service names +(`evo_auth`, `evo_crm`, …). No stack in this repository runs the gateway +against them, so both shipped stacks override or bypass them: - **`docker-compose.yml` (dev)** uses *hyphenated* service names (`evo-auth`, `evo-crm`, …) and ships **no gateway** at all — the browser hits each service