diff --git a/backend/src/app/config.clj b/backend/src/app/config.clj
index 4824a5d782..6e9f31b313 100644
--- a/backend/src/app/config.clj
+++ b/backend/src/app/config.clj
@@ -42,7 +42,6 @@
:rpc-rlimit-config "resources/rlimit.edn"
:rpc-climit-config "resources/climit.edn"
- :auto-file-snapshot-total 10
:auto-file-snapshot-every 5
:auto-file-snapshot-timeout "3h"
@@ -101,7 +100,6 @@
[:telemetry-uri {:optional true} :string]
[:telemetry-with-taiga {:optional true} ::sm/boolean] ;; DELETE
- [:auto-file-snapshot-total {:optional true} ::sm/int]
[:auto-file-snapshot-every {:optional true} ::sm/int]
[:auto-file-snapshot-timeout {:optional true} ::dt/duration]
diff --git a/backend/src/app/main.clj b/backend/src/app/main.clj
index 1ad2fcc4c8..b971eafddf 100644
--- a/backend/src/app/main.clj
+++ b/backend/src/app/main.clj
@@ -349,7 +349,6 @@
:file-gc (ig/ref :app.tasks.file-gc/handler)
:file-gc-scheduler (ig/ref :app.tasks.file-gc-scheduler/handler)
:offload-file-data (ig/ref :app.tasks.offload-file-data/handler)
- :file-xlog-gc (ig/ref :app.tasks.file-xlog-gc/handler)
:tasks-gc (ig/ref :app.tasks.tasks-gc/handler)
:telemetry (ig/ref :app.tasks.telemetry/handler)
:storage-gc-deleted (ig/ref ::sto.gc-deleted/handler)
@@ -405,10 +404,6 @@
{::db/pool (ig/ref ::db/pool)
::sto/storage (ig/ref ::sto/storage)}
- :app.tasks.file-xlog-gc/handler
- {::db/pool (ig/ref ::db/pool)
- ::sto/storage (ig/ref ::sto/storage)}
-
:app.tasks.telemetry/handler
{::db/pool (ig/ref ::db/pool)
::http.client/client (ig/ref ::http.client/client)
diff --git a/backend/src/app/rpc/commands/files_update.clj b/backend/src/app/rpc/commands/files_update.clj
index 89f75b5806..a4bdbbe209 100644
--- a/backend/src/app/rpc/commands/files_update.clj
+++ b/backend/src/app/rpc/commands/files_update.clj
@@ -223,15 +223,6 @@
(let [storage (sto/resolve cfg ::db/reuse-conn true)]
(some->> (:data-ref-id file) (sto/touch-object! storage))))
- (-> cfg
- (assoc ::wrk/task :file-xlog-gc)
- (assoc ::wrk/label (str "xlog:" (:id file)))
- (assoc ::wrk/params {:file-id (:id file)})
- (assoc ::wrk/delay (dt/duration "5m"))
- (assoc ::wrk/dedupe true)
- (assoc ::wrk/priority 1)
- (wrk/submit!))
-
(persist-file! cfg file)
(let [params (assoc params :file file)
diff --git a/backend/src/app/tasks/file_xlog_gc.clj b/backend/src/app/tasks/file_xlog_gc.clj
deleted file mode 100644
index f0654916ce..0000000000
--- a/backend/src/app/tasks/file_xlog_gc.clj
+++ /dev/null
@@ -1,64 +0,0 @@
-;; This Source Code Form is subject to the terms of the Mozilla Public
-;; License, v. 2.0. If a copy of the MPL was not distributed with this
-;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;;
-;; Copyright (c) KALEIDOS INC
-
-(ns app.tasks.file-xlog-gc
- (:require
- [app.common.logging :as l]
- [app.config :as cf]
- [app.db :as db]
- [integrant.core :as ig]))
-
-;; Get the latest available snapshots without exceeding the total
-;; snapshot limit
-(def ^:private sql:get-latest-snapshots
- "SELECT fch.id, fch.created_at
- FROM file_change AS fch
- WHERE fch.file_id = ?
- AND fch.created_by = 'system'
- AND fch.data IS NOT NULL
- AND fch.deleted_at > now()
- ORDER BY fch.created_at DESC
- LIMIT ?")
-
-;; Mark all snapshots that are outside the allowed total threshold
-;; available for the GC
-(def ^:private sql:delete-snapshots
- "UPDATE file_change
- SET deleted_at = now()
- WHERE file_id = ?
- AND deleted_at > now()
- AND data IS NOT NULL
- AND created_by = 'system'
- AND created_at < ?")
-
-(defn- get-alive-snapshots
- [conn file-id]
- (let [total (cf/get :auto-file-snapshot-total 10)
- snapshots (db/exec! conn [sql:get-latest-snapshots file-id total])]
- (not-empty snapshots)))
-
-(defn- delete-old-snapshots!
- [{:keys [::db/conn] :as cfg} file-id]
- (when-let [snapshots (get-alive-snapshots conn file-id)]
- (let [last-date (-> snapshots peek :created-at)
- result (db/exec-one! conn [sql:delete-snapshots file-id last-date])]
- (l/inf :hint "delete old file snapshots"
- :file-id (str file-id)
- :current (count snapshots)
- :deleted (db/get-update-count result)))))
-
-(defmethod ig/assert-key ::handler
- [_ params]
- (assert (db/pool? (::db/pool params)) "expected a valid database pool"))
-
-(defmethod ig/init-key ::handler
- [_ cfg]
- (fn [{:keys [props] :as task}]
- (let [file-id (:file-id props)]
- (assert (uuid? file-id) "expected file-id on props")
- (-> cfg
- (assoc ::db/rollback (:rollback props false))
- (db/tx-run! delete-old-snapshots! file-id)))))
diff --git a/docs/technical-guide/getting-started.md b/docs/technical-guide/getting-started.md
index 94cea0268f..7fc6da894e 100644
--- a/docs/technical-guide/getting-started.md
+++ b/docs/technical-guide/getting-started.md
@@ -30,6 +30,15 @@ and do not want to depend on any external provider, or need to do any special cu
Or you can try other options,
offered by Penpot community.
+## Recommended settings
+To self-host Penpot, you’ll need a server with the following specifications:
+
+* **CPU:** 1-2 CPUs
+* **RAM:** 4 GiB of RAM
+* **Disk Space:** Disk requirements depend on your usage. Disk usage primarily involves the database and any files uploaded by users.
+
+This setup should be sufficient for a smooth experience with typical usage (your mileage may vary).
+
## Install with Elestio
This section explains how to get Penpot up and running using dropdown-menu-item* {:class (stl/css :submenu-item)
- :on-click on-pin-version
- :on-key-down on-pin-version-key-down
- :id "file-menu-show-version-history"}
- [:span {:class (stl/css :item-name)}
- (tr "dashboard.create-version-menu")]]
+ [:> dropdown-menu-item* {:class (stl/css :submenu-item)
+ :on-click on-pin-version
+ :on-key-down on-pin-version-key-down
+ :id "file-menu-show-version-history"}
+ [:span {:class (stl/css :item-name)}
+ (tr "dashboard.create-version-menu")]]
- [:> dropdown-menu-item* {:class (stl/css :submenu-item)
- :on-click on-show-version-history
- :on-key-down on-show-version-history-key-down
- :id "file-menu-show-version-history"}
- [:span {:class (stl/css :item-name)}
- (tr "dashboard.show-version-history")]]
+ [:> dropdown-menu-item* {:class (stl/css :submenu-item)
+ :on-click on-show-version-history
+ :on-key-down on-show-version-history-key-down
+ :id "file-menu-show-version-history"}
+ [:span {:class (stl/css :item-name)}
+ (tr "dashboard.show-version-history")]]
- [:div {:class (stl/css :separator)}]
+ [:div {:class (stl/css :separator)}]])
[:> dropdown-menu-item* {:class (stl/css :submenu-item)
:on-click on-export-shapes
diff --git a/frontend/src/app/main/ui/workspace/right_header.cljs b/frontend/src/app/main/ui/workspace/right_header.cljs
index 771889397b..32d679fea0 100644
--- a/frontend/src/app/main/ui/workspace/right_header.cljs
+++ b/frontend/src/app/main/ui/workspace/right_header.cljs
@@ -251,7 +251,9 @@
:on-click toggle-history}
i/history]])
- (when (cf/external-feature-flag "share-01" "test")
+ (when (and
+ (not (:is-default team))
+ (cf/external-feature-flag "share-01" "test"))
[:a {:class (stl/css :viewer-btn)
:title (tr "workspace.header.share")
:on-click open-share-dialog}