mirror of
https://github.com/penpot/penpot.git
synced 2025-08-01 03:08:27 +02:00
🎉 Add plugable storages abstraction layer (with support for fs, s3 and db).
This commit is contained in:
parent
9146642947
commit
760eb926bf
16 changed files with 893 additions and 17 deletions
|
@ -58,6 +58,29 @@
|
|||
{:media-directory (:media-directory config)
|
||||
:media-uri (:media-uri config)}
|
||||
|
||||
:app.storage/storage
|
||||
{:pool (ig/ref :app.db/pool)
|
||||
:backend (:storage-default-backend cfg/config :s3)
|
||||
:backends {:s3 (ig/ref :app.storage.s3/backend)
|
||||
:fs (ig/ref :app.storage.fs/backend)
|
||||
:db (ig/ref :app.storage.db/backend)}}
|
||||
|
||||
:app.storage/gc-task
|
||||
{:pool (ig/ref :app.db/pool)
|
||||
:storage (ig/ref :app.storage/storage)}
|
||||
|
||||
:app.storage.fs/backend
|
||||
{:directory (:storage-fs-directory cfg/config)
|
||||
:uri (:storage-fs-uri cfg/config)}
|
||||
|
||||
:app.storage.db/backend
|
||||
{:pool (ig/ref :app.db/pool)}
|
||||
|
||||
:app.storage.s3/backend
|
||||
{:region (:storage-s3-region cfg/config)
|
||||
:bucket (:storage-s3-bucket cfg/config)}
|
||||
|
||||
|
||||
:app.http.session/session
|
||||
{:pool (ig/ref :app.db/pool)
|
||||
:cookie-name "auth-token"}
|
||||
|
@ -75,7 +98,8 @@
|
|||
:metrics (ig/ref :app.metrics/metrics)
|
||||
:google-auth (ig/ref :app.http.auth/google)
|
||||
:gitlab-auth (ig/ref :app.http.auth/gitlab)
|
||||
:ldap-auth (ig/ref :app.http.auth/ldap)}
|
||||
:ldap-auth (ig/ref :app.http.auth/ldap)
|
||||
:storage (ig/ref :app.storage/storage)}
|
||||
|
||||
:app.rpc/rpc
|
||||
{:pool (ig/ref :app.db/pool)
|
||||
|
@ -85,7 +109,6 @@
|
|||
:storage (ig/ref :app.media-storage/storage)
|
||||
:redis (ig/ref :app.redis/redis)}
|
||||
|
||||
|
||||
:app.notifications/handler
|
||||
{:redis (ig/ref :app.redis/redis)
|
||||
:pool (ig/ref :app.db/pool)
|
||||
|
@ -143,6 +166,10 @@
|
|||
:cron #app/cron "0 0 0 */1 * ?" ;; daily
|
||||
:fn (ig/ref :app.tasks.file-xlog-gc/handler)}
|
||||
|
||||
{:id "storage-gc"
|
||||
:cron #app/cron "0 0 0 */1 * ?" ;; daily
|
||||
:fn (ig/ref :app.storage/gc-task)}
|
||||
|
||||
{:id "tasks-gc"
|
||||
:cron #app/cron "0 0 0 */1 * ?" ;; daily
|
||||
:fn (ig/ref :app.tasks.tasks-gc/handler)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue