Skip to content

Setting up the server

Michael-Stanford edited this page Apr 29, 2021 · 18 revisions

Installing on Render.com

This project uses two products from Render.com: a web service and a PostgreSQL database. It also requires an email account for notifications.

Web Service

Render is tightly integrated with GitHub. It loads your web service directly from the GitHub repo. No need to provision a server or use Docker. Create a web service instance on Render.com by clicking on the New button.

POSTGRES_URL

The creation process walks you through connecting the new instance to the Github repo. Then, any time a new version is committed to the repo, the instance automatically refreshes and relaunches.

Database

Create a PostgreSQL database instance on Render: POSTGRES_URL

Then copy its 'Internal connection string' into the POSTGRES_URL environment variable in the web service instance.

POSTGRES_URL

How to add a User

The first admin user can be added with an environment variable (INITIAL_ADMIN_EMAILS) or with a Knex seed in the source code, then that user can add other users in the Users tab in the Cares-Reporter web UI.

How to restart the server:

The server restarts automatically when you commit to Github, and when you change an environment variable in the Render UI. You can also force it to restart manually:

  1. Log in to your Render account.
  2. Select your web service.
  3. Select the "Manual Deploy" button.

Remote access to the instance:

You can't access the server instance with SSH, but you can set environment variables in the Render.com admin UI, you can get a shell in your browser (using the Shell tab in the Render.com admin UI), and you can access the database directly with pg_dump, psql and knex (get the URLs from the Render.com admin UI). If you find it essential to download or upload a file to the server disk storage, consider using Magic Wormhole.