Skip to content

bennytaccardi/supabase-hearth-pulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supabase Hearth Pulse

KeepAlive for Supabase is an open-source tool designed to prevent Supabase free-tier databases from becoming inactive due to idle time. This tool periodically sends requests to your database to keep it running, ensuring uninterrupted service for development or low-traffic applications.

Prerequisites

  • Script uses pnpm as package manager. Install pnpm
  • Create a dummy table in you Supabase db. This table will be used by the script to keep your db alive
    CREATE TABLE "your_table_name" (
        id BIGINT generated BY DEFAULT AS IDENTITY,
        name text NULL DEFAULT '':: text,
        random uuid NULL DEFAULT gen_random_uuid (),
        CONSTRAINT "your_table_name_pkey" PRIMARY key (id)
    );

How to use it

  1. Clone the Repository
git clone https://github.com/bennytaccardi/supabase-hearth-pulse.git
cd supabase-hearth-pulse
  1. Install Dependencies
pnpm install
  1. Configure Environment Variables Create a .env file in the root directory and add your Supabase project details: TABLE_NAME=your-keep-alive-table-name #default "keep-alive"

  2. Add cron in your OS Add a scheduled cron job to run the script every X hours. Bear in mind that Supabase will stop your DB after 7 days of inactiviy.

License

This project is licensed under the MIT License. See the LICENSE file for details.

This README provides a clear overview and setup instructions for users interested in your tool.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published