Quickstart
Deploy an app from GitHub, give it a database and open it on its HTTPS address.
This guide deploys a web app from a GitHub repository, adds a PostgreSQL database and connects the two. It takes a few minutes.
Before you start
- A Raseef account. Sign in at raseef.dev.
- A web app in a GitHub repository that you own, or that belongs to a GitHub organization you own.
- The app reads the port to listen on from the
PORTvariable, and listens on all interfaces (0.0.0.0), not only onlocalhost.
const port = process.env.PORT || 8080;
app.listen(port, '0.0.0.0');Deploy the app
Create a project
In the console, choose New project, then GitHub Repository.
Connect GitHub
Choose Connect GitHub and install the Raseef app on your GitHub account or organization. It asks for read-only access to the repositories you pick. See Deploy from GitHub for who can connect an account.
Choose the repository and branch
Pick the repository and the branch to deploy. If the repository holds several apps (a monorepo), Raseef lists the ones it finds and you choose which to create.
Deploy
Choose Deploy Now. Raseef builds the branch's latest commit and deploys it. (If the repository declares variables
in a file such as .env.example, the button is Add Variables: set them in the service's Variables, then deploy.) Follow the build in Builds and the
app's output in Logs. When the deployment is live, the service panel shows its address, like
my-app-x7k2.raseef.run.
Add a database
Create PostgreSQL
In the project, choose Create, then PostgreSQL from the templates. Raseef creates the database with its own
volume and a generated password. Name the service db.
Reference it from your app
Open your app's Variables and add:
DATABASE_URL=${{ db.DATABASE_URL }}The reference is replaced with the database's connection string when your app deploys. It points to the database's private address, which only services in the same environment can reach.
Deploy the change
Variables apply on the next deployment. Deploy your app, and it starts with DATABASE_URL set.