The server should start up and ping the database, it doesn't need to hold a connection to it. If the connection fails, the server should shutdown with a non-zero status.
Docker compose should be used to run the db with a gitignored directory in the repo for it's volume.
Acceptance Criteria
[ ] Update the config to look for the DATABASE_URL environment variable.
[ ] The server should connect to and just ping the database for this issue.
[ ] Set up docker compose to run pg locally, along with a gitignored directory for it's volume.
Issue Description
This is for setting up a postrgres database on fly.io and for local development.
I've already set up a development postgres app on fly.io following their Create a Fly Postgres Cluster docs and attached the database to the eventual-server app which exposes the full connection string as an environment variable for the server:
DATABASE_URL
The pg image fly uses is:
flyio/postgres-flex:15.3 (v0.0.45)
which corresponds to pg versionPostgreSQL 15.3
, here's the pg docs.We also need to setup a
compose.yaml
file to spin up a local pg database we can work with. This is related to https://github.com/bldg14/eventual/issues/48Supporting Documentation
Implementation Details
The server should start up and ping the database, it doesn't need to hold a connection to it. If the connection fails, the server should shutdown with a non-zero status.
Docker compose should be used to run the db with a gitignored directory in the repo for it's volume.
Acceptance Criteria
DATABASE_URL
environment variable.