diff --git a/.env.example b/.env.example index a8065f8..cad187a 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 64e2748..291291e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,12 +56,14 @@ 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 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 @@ -115,6 +117,9 @@ services: - crm_bundle:/usr/local/bundle - crm_node_modules:/app/node_modules - crm_cache:/app/tmp/cache + # /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 @@ -155,6 +160,8 @@ services: - crm_bundle:/usr/local/bundle - crm_node_modules:/app/node_modules - crm_cache:/app/tmp/cache + # 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 diff --git a/evo-ai-crm-community b/evo-ai-crm-community index 833bcd9..226a626 160000 --- a/evo-ai-crm-community +++ b/evo-ai-crm-community @@ -1 +1 @@ -Subproject commit 833bcd9e3d812458ee74007a052d97d541829f0c +Subproject commit 226a62639f14db2c4ad97f15264aa0d080e84eb3 diff --git a/evo-ai-frontend-community b/evo-ai-frontend-community index b972138..36544f5 160000 --- a/evo-ai-frontend-community +++ b/evo-ai-frontend-community @@ -1 +1 @@ -Subproject commit b97213850b58f5d5bc9598a336b5f41154725865 +Subproject commit 36544f58dadb90c16f607cab6d15c2803d06230f diff --git a/evo-auth-service-community b/evo-auth-service-community index ed6affd..25b5ac4 160000 --- a/evo-auth-service-community +++ b/evo-auth-service-community @@ -1 +1 @@ -Subproject commit ed6affd9e069366f69d12055db42b4d522e378a3 +Subproject commit 25b5ac435de8afd9b2ab5f5fdd146795484ad9a3 diff --git a/evolution-api b/evolution-api index af5122c..cd800f2 160000 --- a/evolution-api +++ b/evolution-api @@ -1 +1 @@ -Subproject commit af5122c3f0281f2e05ec328545a12598962ac0b2 +Subproject commit cd800f2976e1e5b682fbf86a01ee4d85ae61f370 diff --git a/evolution-go b/evolution-go index 89eaae3..9f0eb34 160000 --- a/evolution-go +++ b/evolution-go @@ -1 +1 @@ -Subproject commit 89eaae337e61bba9939d3a9a3d606d1469b4b281 +Subproject commit 9f0eb34b59ee83005443fbf22bd9ca9fa1750453