whale net docker app for managing psql database hopefully will make it easier to build and deploy pet projects once everything is in place
use flyway to manage database maintenance. make it easy to test locally, and deploy remotely without having to remember various docker deploments. maybe further into the future even some CI/CD or code review benefits
main branch is protected to prevent accidental deployments
- run
cp .env.example .env
and modify the.env
file to include the correct secrets - (apparently this step isn't needed, so uhhh yeah, optional) run
export $(cat .env | sed 's/\r$//' | xargs)
to export env variables to your current environment - run
docker compose up -d
to run container locally a.-d
is for detached mode (runs in background) b.docker compose down
will shutdown container c. flyway will run a migration whenever you rundocker compose up
. this will bring your local database up to date with whatever this repo has d. database port that is publically made accessible is11420
. this is routed to5432
internally within the container
https://flywaydb.org/documentation/concepts/migrations#naming