1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00

Use Redis for ActiveJob and ActionCable (#2004)

* Use Redis for ActiveJob and ActionCable

* Fix alwaysApply setting

* Update queue names and weights

* Tweak weights

* Update job queues

* Update docker setup guide

* Remove deprecated upgrade columns from users table

* Refactor Redis configuration for Sidekiq and caching in production environment

* Add Sidekiq Sentry monitoring

* queue naming fix

* Clean up schema
This commit is contained in:
Zach Gollwitzer 2025-03-19 12:36:16 -04:00 committed by GitHub
parent a7db914005
commit 19cc63c8f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
75 changed files with 328 additions and 1684 deletions

View file

@ -2,10 +2,6 @@
This guide will help you setup, update, and maintain your self-hosted Maybe application with Docker Compose. Docker Compose is the most popular and recommended way to self-host the Maybe app.
If you want a _less
technical_ way to host the Maybe app, you can [host on Render](/docs/hosting/one-click-deploy.md) as an
_**alternative** to Docker Compose_.
## Setup Guide
Follow the guide below to get your app running.
@ -30,7 +26,7 @@ docker run hello-world
Open your terminal and create a directory where your app will run. Below is an example command with a recommended directory:
```bash
# Create a directory on your computer for Docker files
# Create a directory on your computer for Docker files (name whatever you'd like)
mkdir -p ~/docker-apps/maybe
# Once created, navigate your current working directory to the new folder
@ -42,8 +38,8 @@ cd ~/docker-apps/maybe
Make sure you are in the directory you just created and run the following command:
```bash
# Download the sample docker-compose.yml file from the Maybe Github repository
curl -o compose.yml https://raw.githubusercontent.com/maybe-finance/maybe/main/docker-compose.example.yml
# Download the sample compose.yml file from the Maybe Github repository
curl -o compose.yml https://raw.githubusercontent.com/maybe-finance/maybe/main/compose.example.yml
```
This command will do the following:
@ -53,6 +49,12 @@ This command will do the following:
At this point, the only file in your current working directory should be `compose.yml`.
### Step 3 (optional): Configure your environment
By default, our `compose.example.yml` file runs without any configuration. That said, if you would like extra security (important if you're running outside of a local network), you can follow the steps below to set things up.
If you're running the app locally and don't care much about security, you can skip this step.
#### Create your environment file
In order to configure the app, you will need to create a file called `.env`, which is where Docker will read environment variables from.
@ -92,7 +94,7 @@ SECRET_KEY_BASE="replacemewiththegeneratedstringfromthepriorstep"
POSTGRES_PASSWORD="replacemewithyourdesireddatabasepassword"
```
### Step 3: Test your app
### Step 4: Run the app
You are now ready to run the app. Start with the following command to make sure everything is working:
@ -106,14 +108,14 @@ Open your browser, and navigate to `http://localhost:3000`.
If everything is working, you will see the Maybe login screen.
### Step 4: Create your account
### Step 5: Create your account
The first time you run the app, you will need to register a new account by hitting "create your account" on the login page.
1. Enter your email
2. Enter a password
### Step 5: Run the app in the background
### Step 6: Run the app in the background
Most self-hosting users will want the Maybe app to run in the background on their computer so they can access it at all times. To do this, hit `Ctrl+C` to stop the running process, and then run the following command:
@ -127,7 +129,7 @@ The `-d` flag will run Docker Compose in "detached" mode. To verify it is runnin
docker compose ls
```
### Step 6: Enjoy!
### Step 7: Enjoy!
Your app is now set up. You can visit it at `http://localhost:3000` in your browser.
@ -135,7 +137,7 @@ If you find bugs or have a feature request, be sure to read through our [contrib
## How to update your app
The mechanism that updates your self-hosted Maybe app is the GHCR (Github Container Registry) Docker image that you see in the `docker-compose.yml` file:
The mechanism that updates your self-hosted Maybe app is the GHCR (Github Container Registry) Docker image that you see in the `compose.yml` file:
```yml
image: ghcr.io/maybe-finance/maybe:latest
@ -152,13 +154,13 @@ NOT_ automatically update. To update your self-hosted app, run the following com
```bash
cd ~/docker-apps/maybe # Navigate to whatever directory you configured the app in
docker compose pull # This pulls the "latest" published image from GHCR
docker compose build app # This rebuilds the app with updates
docker compose build # This rebuilds the app with updates
docker compose up --no-deps -d app # This restarts the app using the newest version
```
## How to change which updates your app receives
If you'd like to pin the app to a specific version or tag, all you need to do is edit the `docker-compose.yml` file:
If you'd like to pin the app to a specific version or tag, all you need to do is edit the `compose.yml` file:
```yml
image: ghcr.io/maybe-finance/maybe:stable
@ -168,7 +170,7 @@ After doing this, make sure and restart the app:
```bash
docker compose pull # This pulls the "latest" published image from GHCR
docker compose build app # This rebuilds the app with updates
docker compose build # This rebuilds the app with updates
docker compose up --no-deps -d app # This restarts the app using the newest version
```

View file

@ -1,90 +0,0 @@
# Deploy Maybe in One Click
Below are our "one-click deploy" options for running Maybe in the cloud:
## Render
Welcome to the one-click deploy guide for Maybe on [Render](https://render.com/)!
Render is a hosting platform with a generous free tier and makes it easy to get
started with Maybe:
- Getting started is FREE
- Up and running in <5 minutes
- Your Maybe app is automatically deployed to a live URL
### Estimated Costs
- FREE to _get up and running_
- $7 per month for a basic app (Render requires you to upgrade your database to
keep using it)
- $14+ per month for optimal performance
_**IMPORTANT:** if you plan to host Maybe on Render long-term, you MUST upgrade
your database to a paid Render service._
### Instructions
#### Step 1: Create Render Blueprint
<a href="https://render.com/deploy?repo=https://github.com/maybe-finance/maybe">
<img src="https://render.com/images/deploy-to-render-button.svg" alt="Deploy to Render" />
</a>
1. Click the button above.
2. Sign in or create your account with Render (FREE)
3. Give your blueprint a name (we suggest `Maybe`)
4. Select the `main` branch
5. You should see a section at the bottom with a "Key:Value" field
for `SECRET_KEY_BASE`. Do NOT click "generate".
6. On your computer, open a terminal and make sure you have
the [openssl](https://github.com/openssl/openssl) utility installed on your
computer. You can run `openssl --version` to verify it is installed.
7. Generate your `SECRET_KEY_BASE` by running the following command in your
terminal: `openssl rand -hex 64` ([docs](https://www.openssl.org/docs/man1.1.1/man1/rand.html)).
8. Do NOT share this value with anyone.
9. Go back to your browser and paste this value in the "Value" field
for `SECRET_KEY_BASE`
10. Click "Apply". This will take a few minutes.
11. Once complete, click on the `maybe` "Web Service". You should see a custom
URL in the format `https://maybe-abcd.onrender.com`. Click on it, and you'll
see your running Maybe app!
#### Step 2: Add your deploy hook for auto-updates
To get new releases, you will need to add your deploy hook to the app.
1. Click on the `maybe` "Web Service"
2. Click "Settings"
3. Scroll down to the end of the "Build and Deploy" section until you find the "
Deploy Hook"
4. Copy this value
5. Open your new Maybe app, click your profile, click "Self Host Settings"
6. Paste your deploy hook in the settings and save
7. You're all set!
#### Step 3 (IMPORTANT!!!): Upgrade your Render services
By default, we set you up with a FREE Render web service and a FREE postgres
database. We do this for a few reasons:
- It allows you to take self-hosted Maybe for a FREE test-drive
- It prevents newcomers from incurring unexpected hosting charges
##### Upgrade your Database (REQUIRED)
All FREE Render databases **will be deleted after a few months**. This means
that **you will lose all of your Maybe data**.
**To avoid losing data, you MUST upgrade your Render database** (a "starter"
instance is $7/month)
You can upgrade your instance directly in the Render dashboard.
##### Upgrade your Web Service (RECOMMENDED)
All FREE Render web services use a small amount of memory and "sleep" after
periods of inactivity.
For the _fastest_ Maybe experience, you should upgrade your web service (a "
starter" instance is $7/month)