Apply migrations
Use k8s port forwarder to forward sandbox or production database.
Set environment variables
PGHOST
PGUSER
PGPASSWORD
PGPORT
Run docker-compose build migrate
Run docker-compose run migrate
Test migrations locally
Run docker-compose build test
Run docker-compose run test
Run docker-compose down
Run dev environment
Run docker-compose build dev
Run docker-compose up -d dev
Run docker-compose run psql
Run docker-compose down
ps: If docker-compose down doesn't work, it might need an extra -v to remove what's left.
Example (apply to sandbox or production)
export PGHOST=localhost
export PGUSER=root
export PGPASSWORD={get-me-from-1p}
export PGPORT="{whatever-you-used-for-the-k8s-forwarder}"
docker-compose build migrate
docker-compose run migrate up