bldg14 / eventual

A simple event calendar
https://eventual-client.fly.dev
MIT License
0 stars 0 forks source link

Setup database #50

Closed kevinfalting closed 9 months ago

kevinfalting commented 10 months ago

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 version PostgreSQL 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/48

Supporting 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