From 84e915ece95250a0eef1884bc4ad94bf7a3fb14e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 8 Feb 2024 12:59:37 +0100 Subject: [PATCH] Allow custom path for ActiveStorage local/disk backend --- config/storage.yml | 2 +- docker-compose.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/storage.yml b/config/storage.yml index 9a15623..010aeb8 100644 --- a/config/storage.yml +++ b/config/storage.yml @@ -1,6 +1,6 @@ local: service: Disk - root: <%= Rails.root.join("storage") %> + root: <%= ENV["ACTIVE_STORAGE_PATH"] || Rails.root.join("storage") %> test: service: Disk diff --git a/docker-compose.yml b/docker-compose.yml index 6e0ff50..340925f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,6 +42,7 @@ services: LDAP_ADMIN_PASSWORD: passthebutter LDAP_USE_TLS: "false" REDIS_URL: redis://redis:6379/0 + ACTIVE_STORAGE_PATH: "/akkounts/tmp/attachments" RS_REDIS_URL: redis://redis:6379/1 RS_STORAGE_URL: "http://localhost:4567" S3_ENABLED: false