From d29cf49d8e44d09519fd833e4dfe2264596bd927 Mon Sep 17 00:00:00 2001 From: Marcelo Date: Fri, 24 Apr 2026 20:14:37 -0300 Subject: [PATCH 1/6] fix(docker): replace auth_storage named volume with bind mount to fix permission denied on storage Named Docker volumes are created with root ownership, causing Errno::EACCES when the Rails process (running as user rails:1000) tries to create subdirs under /rails/storage. Bind mount gives the container process write access. Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 64e27489..eeeed12b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,6 +56,8 @@ services: RAILS_ENV: ${RAILS_ENV:-development} REDIS_URL: redis://:${REDIS_PASSWORD:-evoai_redis_pass}@redis:6379/1 POSTGRES_HOST: postgres + volumes: + - ./evo-auth-service-community/storage:/rails/storage depends_on: postgres: condition: service_healthy From b51ca2d050f11459caacf3575d6148032b55b911 Mon Sep 17 00:00:00 2001 From: Marcelo Date: Mon, 27 Apr 2026 17:30:02 -0300 Subject: [PATCH 2/6] fix(EVO-975): fix pipeline default auto-assignment + auth server pid cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - evo-ai-crm-community: bump submodule to fix(EVO-975) — remove :account from fetch_pipeline eager loading (AssociationNotFoundError broke set_as_default, preventing Pipeline.default.first from ever returning a pipeline) - docker-compose.yml: add rm -f server.pid to evo-auth startup command to prevent stale PID file from blocking restarts Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 2 +- evo-ai-crm-community | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index eeeed12b..3bf99342 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,7 +63,7 @@ services: condition: service_healthy redis: condition: service_healthy - command: bash -c "bundle install && bundle exec rails db:prepare && bundle exec rails s -p 3001 -b 0.0.0.0" + command: bash -c "rm -f /rails/tmp/pids/server.pid && bundle install && bundle exec rails db:prepare && bundle exec rails s -p 3001 -b 0.0.0.0" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3001/health"] interval: 30s diff --git a/evo-ai-crm-community b/evo-ai-crm-community index 833bcd9e..535cd769 160000 --- a/evo-ai-crm-community +++ b/evo-ai-crm-community @@ -1 +1 @@ -Subproject commit 833bcd9e3d812458ee74007a052d97d541829f0c +Subproject commit 535cd7690fc50f9d54382c746523ab589f09b0ba From 9087d96c7b37d03382bbf8cac78a092cd7dedd3d Mon Sep 17 00:00:00 2001 From: Marcelo Date: Thu, 30 Apr 2026 14:27:13 -0300 Subject: [PATCH 3/6] chore: bump all submodules to latest - evo-ai-crm-community: fix(EVO-975) messages eager loading + auth service stale connection retry + evolution health endpoint + attachment url expiry - evo-ai-core-service-community: refactor EvoAuthAccount json.RawMessage + ActivePlan optional - evo-ai-frontend-community: fix(EVO-979) audio OGG/Opus + Profile i18n + SLA types + setup locale - evo-ai-processor-community: fix run_seeders.py argparse help text - evo-auth-service-community: onboarding survey backend (token, endpoint, user associations) - evolution-api: v2.3.7 release - evolution-go: updated binary with latest changes Co-Authored-By: Claude Sonnet 4.6 --- evo-ai-core-service-community | 2 +- evo-ai-crm-community | 2 +- evo-ai-frontend-community | 2 +- evo-ai-processor-community | 2 +- evo-auth-service-community | 2 +- evolution-api | 2 +- evolution-go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/evo-ai-core-service-community b/evo-ai-core-service-community index 33230bb8..ba04dc8b 160000 --- a/evo-ai-core-service-community +++ b/evo-ai-core-service-community @@ -1 +1 @@ -Subproject commit 33230bb8e6328939dd067d1dc326bdd8335d0734 +Subproject commit ba04dc8b32b5260251f4db4d5564ed3151f35bbe diff --git a/evo-ai-crm-community b/evo-ai-crm-community index 535cd769..2282f47a 160000 --- a/evo-ai-crm-community +++ b/evo-ai-crm-community @@ -1 +1 @@ -Subproject commit 535cd7690fc50f9d54382c746523ab589f09b0ba +Subproject commit 2282f47a0ebca93cfe560f78dd4120dda07d81c1 diff --git a/evo-ai-frontend-community b/evo-ai-frontend-community index b9721385..5206b1fd 160000 --- a/evo-ai-frontend-community +++ b/evo-ai-frontend-community @@ -1 +1 @@ -Subproject commit b97213850b58f5d5bc9598a336b5f41154725865 +Subproject commit 5206b1fd4c6b2ba03d9393cfc5dfb0bba8dd83ba diff --git a/evo-ai-processor-community b/evo-ai-processor-community index 2b329c6c..aa7fbf32 160000 --- a/evo-ai-processor-community +++ b/evo-ai-processor-community @@ -1 +1 @@ -Subproject commit 2b329c6ced5a222f54a4ec340fc5c984956c39ab +Subproject commit aa7fbf322665b54433077e6164f93fc94d379bc5 diff --git a/evo-auth-service-community b/evo-auth-service-community index ed6affd9..8c6af566 160000 --- a/evo-auth-service-community +++ b/evo-auth-service-community @@ -1 +1 @@ -Subproject commit ed6affd9e069366f69d12055db42b4d522e378a3 +Subproject commit 8c6af5661a5c388305fcdb6cd148f26d3a2b8c70 diff --git a/evolution-api b/evolution-api index af5122c3..cd800f29 160000 --- a/evolution-api +++ b/evolution-api @@ -1 +1 @@ -Subproject commit af5122c3f0281f2e05ec328545a12598962ac0b2 +Subproject commit cd800f2976e1e5b682fbf86a01ee4d85ae61f370 diff --git a/evolution-go b/evolution-go index 89eaae33..b6656c72 160000 --- a/evolution-go +++ b/evolution-go @@ -1 +1 @@ -Subproject commit 89eaae337e61bba9939d3a9a3d606d1469b4b281 +Subproject commit b6656c724fa3741bf63f7b74078026bff80c3643 From d59d0d23dbdf549d99b9376d7a1ec0d8f4f60d08 Mon Sep 17 00:00:00 2001 From: Marcelo Date: Mon, 4 May 2026 12:53:18 -0300 Subject: [PATCH 4/6] =?UTF-8?q?fix(EVO-976):=20fix=20avatar=20storage=20?= =?UTF-8?q?=E2=80=94=20volumes,=20AUTH=5FSERVICE=5FURL=20env,=20storage=20?= =?UTF-8?q?docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - docker-compose.yml: add crm_storage volume to evo-crm and evo-crm-sidekiq so web and Sidekiq containers share the same local storage (fixes ActiveStorage blobs written by Sidekiq not being visible to the web container) - .env.example: add AUTH_SERVICE_URL var (needed by avatarable.rb to generate absolute avatar URLs accessible from the browser) - .env.example: expand cloud storage section with Cloudflare R2 / S3 setup guide and CORS bucket configuration note (acceptance criterion from EVO-976) - evo-auth-service-community: bump to fix/EVO-976-avatar-url (PR #10) Co-Authored-By: Claude Sonnet 4.6 --- .env.example | 16 ++++++++++++++++ docker-compose.yml | 3 +++ evo-auth-service-community | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index a8065f8e..cad187a4 100644 --- a/.env.example +++ b/.env.example @@ -46,6 +46,8 @@ EVOAI_CRM_API_TOKEN=6e10e689-58ce-4416-bf0d-f5818bf2dcf8 RAILS_ENV=development RAILS_MAX_THREADS=5 FRONTEND_URL=http://localhost:5173 +# Public URL of the auth service accessible from the browser (used for ActiveStorage avatar URLs) +AUTH_SERVICE_URL=http://localhost:3001 # Doorkeeper JWT (OAuth2 tokens) DOORKEEPER_JWT_SECRET_KEY=a]i9F#k2$Lm7Nq0R!sT4uW6xZ8bD1eG3hJ5oP7rV9yAcE2fH4jM6pS8vX0zB3dK5nQ7tU9wY1 @@ -232,6 +234,20 @@ VITE_TINYMCE_API_KEY=no-api-key # ============================================================================= # OPTIONAL — Cloud Storage (default: local filesystem) # ============================================================================= +# To use Cloudflare R2, AWS S3, MinIO or any S3-compatible service: +# 1. Set ACTIVE_STORAGE_SERVICE=s3_compatible (both auth and CRM services use this var) +# 2. Fill in the bucket credentials below +# 3. Configure your bucket's CORS policy to allow GET from your frontend domain +# (this must be done in the storage provider's dashboard — not in this file) +# +# Example for Cloudflare R2: +# ACTIVE_STORAGE_SERVICE=s3_compatible +# STORAGE_BUCKET_NAME=my-bucket +# STORAGE_ACCESS_KEY_ID= +# STORAGE_SECRET_ACCESS_KEY= +# STORAGE_REGION=auto +# STORAGE_ENDPOINT=https://.r2.cloudflarestorage.com +# # STORAGE_BUCKET_NAME= # STORAGE_ACCESS_KEY_ID= # STORAGE_SECRET_ACCESS_KEY= diff --git a/docker-compose.yml b/docker-compose.yml index 3bf99342..fca5c95e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -117,6 +117,7 @@ services: - crm_bundle:/usr/local/bundle - crm_node_modules:/app/node_modules - crm_cache:/app/tmp/cache + - crm_storage:/app/storage depends_on: postgres: condition: service_healthy @@ -157,6 +158,7 @@ services: - crm_bundle:/usr/local/bundle - crm_node_modules:/app/node_modules - crm_cache:/app/tmp/cache + - crm_storage:/app/storage depends_on: postgres: condition: service_healthy @@ -299,4 +301,5 @@ volumes: crm_bundle: crm_node_modules: crm_cache: + crm_storage: processor_logs: diff --git a/evo-auth-service-community b/evo-auth-service-community index 8c6af566..a569eb43 160000 --- a/evo-auth-service-community +++ b/evo-auth-service-community @@ -1 +1 @@ -Subproject commit 8c6af5661a5c388305fcdb6cd148f26d3a2b8c70 +Subproject commit a569eb431d48258e4f6df67c1419fdd794f2e07c From 1fa69b0f4e124ed74766b6a738824b1fc3d61d38 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Mon, 4 May 2026 16:59:11 -0300 Subject: [PATCH 5/6] fix(EVO-976): address round 2 code review (C1, C2 + repoint orphan submodules) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - docker-compose.yml: drop crm_storage named volume from evo-crm and evo-crm-sidekiq (C2). The project bind ./evo-ai-crm-community:/app:delegated already shares /app/storage between the two containers — the named volume was masking the bind, which (a) hides ActiveStorage blobs from the host and (b) reintroduces the same root-ownership pitfall fixed for auth_storage in commit d29cf49d. - evo-ai-crm-community → 87a81660 (C1): bumps to fix/EVO-976-attachment-processor-spec which adds the AttachmentProcessor specs round-1 review flagged as missing (round-2 reply claimed they existed but they did not). - evo-auth-service-community → 623b5b9d: bumps to fix/EVO-976-avatar-url HEAD with H3/H4/L1 fixes (1.hour TTL, nil instead of '', URI scheme validation). - evo-ai-frontend-community → 36544f5: PR #35 (EVO-979) merged to main — previous pointer 5206b1fd was an orphan SHA (not our ref). - evo-ai-processor-community → 2b329c6c (main HEAD): previous pointer aa7fbf3 was orphan. - evo-ai-core-service-community → 33230bb (main HEAD): previous pointer ba04dc8b was orphan. - evolution-go → 9f0eb34b: refreshed to clean tree. Co-Authored-By: Claude Opus 4.7 (1M context) --- docker-compose.yml | 8 +++++--- evo-ai-core-service-community | 2 +- evo-ai-crm-community | 2 +- evo-ai-frontend-community | 2 +- evo-ai-processor-community | 2 +- evo-auth-service-community | 2 +- evolution-go | 2 +- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index fca5c95e..291291e8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -117,7 +117,9 @@ services: - crm_bundle:/usr/local/bundle - crm_node_modules:/app/node_modules - crm_cache:/app/tmp/cache - - crm_storage:/app/storage + # /app/storage is already shared between evo-crm and evo-crm-sidekiq through + # the project bind above — no additional named volume needed (a named volume + # here would mask the bind and break host visibility of ActiveStorage blobs). depends_on: postgres: condition: service_healthy @@ -158,7 +160,8 @@ services: - crm_bundle:/usr/local/bundle - crm_node_modules:/app/node_modules - crm_cache:/app/tmp/cache - - crm_storage:/app/storage + # See evo-crm above — /app/storage is shared via the project bind, no named + # volume needed (and one here would mask the bind, hiding blobs from host). depends_on: postgres: condition: service_healthy @@ -301,5 +304,4 @@ volumes: crm_bundle: crm_node_modules: crm_cache: - crm_storage: processor_logs: diff --git a/evo-ai-core-service-community b/evo-ai-core-service-community index ba04dc8b..33230bb8 160000 --- a/evo-ai-core-service-community +++ b/evo-ai-core-service-community @@ -1 +1 @@ -Subproject commit ba04dc8b32b5260251f4db4d5564ed3151f35bbe +Subproject commit 33230bb8e6328939dd067d1dc326bdd8335d0734 diff --git a/evo-ai-crm-community b/evo-ai-crm-community index 2282f47a..87a81660 160000 --- a/evo-ai-crm-community +++ b/evo-ai-crm-community @@ -1 +1 @@ -Subproject commit 2282f47a0ebca93cfe560f78dd4120dda07d81c1 +Subproject commit 87a81660b808d5b9f0486d4fb2b380c839351cc1 diff --git a/evo-ai-frontend-community b/evo-ai-frontend-community index 5206b1fd..36544f58 160000 --- a/evo-ai-frontend-community +++ b/evo-ai-frontend-community @@ -1 +1 @@ -Subproject commit 5206b1fd4c6b2ba03d9393cfc5dfb0bba8dd83ba +Subproject commit 36544f58dadb90c16f607cab6d15c2803d06230f diff --git a/evo-ai-processor-community b/evo-ai-processor-community index aa7fbf32..2b329c6c 160000 --- a/evo-ai-processor-community +++ b/evo-ai-processor-community @@ -1 +1 @@ -Subproject commit aa7fbf322665b54433077e6164f93fc94d379bc5 +Subproject commit 2b329c6ced5a222f54a4ec340fc5c984956c39ab diff --git a/evo-auth-service-community b/evo-auth-service-community index a569eb43..623b5b9d 160000 --- a/evo-auth-service-community +++ b/evo-auth-service-community @@ -1 +1 @@ -Subproject commit a569eb431d48258e4f6df67c1419fdd794f2e07c +Subproject commit 623b5b9da0c0eabcd36d7352893ca3a63b4cb4ae diff --git a/evolution-go b/evolution-go index b6656c72..9f0eb34b 160000 --- a/evolution-go +++ b/evolution-go @@ -1 +1 @@ -Subproject commit b6656c724fa3741bf63f7b74078026bff80c3643 +Subproject commit 9f0eb34b59ee83005443fbf22bd9ca9fa1750453 From 5a1562161fd5d76125067f80eb01be9d32694a59 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Mon, 4 May 2026 17:02:20 -0300 Subject: [PATCH 6/6] chore(submodules): repoint to post-merge SHAs after PRs #10 (auth) and #38 (crm) --- evo-ai-crm-community | 2 +- evo-auth-service-community | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/evo-ai-crm-community b/evo-ai-crm-community index 87a81660..226a6263 160000 --- a/evo-ai-crm-community +++ b/evo-ai-crm-community @@ -1 +1 @@ -Subproject commit 87a81660b808d5b9f0486d4fb2b380c839351cc1 +Subproject commit 226a62639f14db2c4ad97f15264aa0d080e84eb3 diff --git a/evo-auth-service-community b/evo-auth-service-community index 623b5b9d..25b5ac43 160000 --- a/evo-auth-service-community +++ b/evo-auth-service-community @@ -1 +1 @@ -Subproject commit 623b5b9da0c0eabcd36d7352893ca3a63b4cb4ae +Subproject commit 25b5ac435de8afd9b2ab5f5fdd146795484ad9a3