This is a bash script for creating a Supabase project with PG On Rails, deployed on Railway, with CI/CD configured, from your terminal, hands-free, in minutes.
"PG On Rails | Self-hosted Supabase. Amazing developer experience."
Prefer to use Railway's web UI?
- Linux/MacOS/WSL
- GitHub account
- Railway account
- Granted consent for Railway to use GitHub on your behalf
- Railway API token
bash <(curl -fsSL https://raw.githubusercontent.com/BenIsenstein/pgonrails-cli/main/start.sh)Input your Railway API token when prompted.
git clone https://github.com/BenIsenstein/pgonrails-cliCopy .env.example into a .env file.
Add your Railway API token to RAILWAY_TOKEN.
Run ./start.sh
It will take about 5 minutes to deploy and configure itself, and will print progress updates.
Clone your new GitHub repo.
git clone YOUR_REPO
Run your Supabase project locally:
cd YOUR_REPO && ./setup.sh && docker compose up
Commit new code and watch your project deploy continuously :)
To learn more about PG On Rails visit the main GitHub repo.