Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

docs: add Hostim.dev as a one-click hosting option (#2567)

Pavel Voronovf05559cdc173
diff --git a/README.md b/README.md
index 37ecfda36c..301bafa654 100644
--- a/README.md
+++ b/README.md
@@ -109,6 +109,8 @@ For further instructions, see guides below.
[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/deploy/sure?referralCode=CW_fPQ)
+[![Deploy on Hostim](https://hostim.dev/img/deploy-button.svg)](https://console.hostim.dev/dashboard?preview=1&modal=1&template=sure)
+
### Managed OpenClaw for Sure Finances
<a href="https://kilocode.pxf.io/repo-readme"><img src="https://kilo.ai/kiloclaw/partner-resources/kiloclaw-logo-yellow-bg-typography.png" alt="Managed OpenClaw for Sure Finances" width="185"/></a>
diff --git a/docs/hosting/hostim.md b/docs/hosting/hostim.md
new file mode 100644
index 0000000000..6842a104af
--- /dev/null
+++ b/docs/hosting/hostim.md
@@ -0,0 +1,41 @@
+# Deploying Sure on Hostim.dev
+
+[Hostim.dev](https://hostim.dev) is a managed container-hosting platform that runs
+Sure with a managed PostgreSQL database, managed Redis, persistent storage, and
+automatic HTTPS — no server to provision or maintain.
+
+## One-click template
+
+Sure is available as a one-click template. It provisions the Rails web server, the
+Sidekiq background worker, PostgreSQL, and Redis for you, and generates
+`SECRET_KEY_BASE` automatically.
+
+1. Open the [Sure template](https://console.hostim.dev/dashboard?preview=1&modal=1&template=sure).
+2. Choose a resource plan.
+3. Click **Deploy**.
+4. Open the generated domain and create your first account.
+
+A full walkthrough is in the [Hostim.dev Sure guide](https://hostim.dev/docs/templates/sure).
+
+## Manual setup
+
+To configure the app yourself, create an app from the `ghcr.io/we-promise/sure:stable`
+image and set the following environment variables:
+
+| Variable | Value |
+| --- | --- |
+| `SECRET_KEY_BASE` | a long random hex string (keep it stable across restarts) |
+| `DB_HOST` / `DB_PORT` | your PostgreSQL host and port |
+| `POSTGRES_DB` / `POSTGRES_USER` / `POSTGRES_PASSWORD` | database credentials |
+| `REDIS_URL` | `redis://<host>:<port>/1` |
+| `SELF_HOSTED` | `true` |
+
+Run the web server and a Sidekiq worker from the same image, both sharing the same
+`SECRET_KEY_BASE`. Run `bin/rails db:prepare` before the web server starts so
+migrations are applied — for example with a start command like
+`sh -c "./bin/rails db:prepare && (bundle exec sidekiq &) && exec ./bin/rails server -b 0.0.0.0"`.
+
+Mount a persistent volume at `/rails/storage`. Sure stores uploaded files (such as
+imported statements) there via Active Storage's local disk service by default;
+without a persistent volume they are lost when the container is replaced, while the
+database still references them.