Problem to deploy Sparrow Reference Web Application

I am struggling with the deployment of the Sparrow Reference Web Application.

Using Netlify, it fails with a next.js cannot be installed error, so I switched to Vercel.

The deployment works, but the site shows only:
An internal error occurred. If this problem persists, contact Blues Support.

The logs from Vercel say:

info  - Loaded env from /var/task/.env.production.local
info  - Loaded env from /var/task/.env
Connecting to database at postgres://postgres:somePassword@sparrow-postgresql-container:5432/postgres

and

Unknown error message code: Can't reach database server at `sparrow-postgresql-container`:`5432`

Please make sure your database server is running at `sparrow-postgresql-container`:`5432`.

In the .env file I left the postgresql settings as default:

# Sparrow Database (default is good for development)
APP_ID="sparrow-rak-app"
POSTGRES_USERNAME=postgres
POSTGRES_PASSWORD=somePassword
POSTGRES_HOST=sparrow-postgresql-container
POSTGRES_PORT=5432
POSTGRES_DATABASE=postgres
DATABASE_URL="postgres://$POSTGRES_USERNAME:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DATABASE"

I am sure I am missing something, but not sure what.

Hey @bernd,

Welcome to the Blues community! And thanks for trying the Sparrow Reference Web App out.

When using a hosted version of the reference app you also need to use a hosted Postgres database, as your local Postgres instance isn’t accessible from the public internet.

We have some links to common hosting options in this section of the documentation: GitHub - blues/sparrow-reference-web-app: Starter project to help Sparrow users see their sensor data quickly.

A PostgreSQL database will be required for any of the deployment methods below. Setting up a production PostgreSQL database is beyond the scope of this guide but, for a price, many cloud services such as Azure Database Service, Heroku or Amazon AWS RDS can host a PostgreSQL database for you.

And actually, Vercel just announced a Postres hosting option last week that might be worth checking out: Vercel Postgres | Vercel Docs.

TJ VanToll

1 Like

Hey TJ,

thanks for the guide, still didn’t get it to work, this web stuff is not my domain.

But it is ok, I found another solution to visualize my data.

1 Like