Used:
Steps:
-
Clone the repository
git clone [email protected]:fpopic/docker-postgres-adminer-goose.git cd docker-postgres-adminer-goose
-
Spin up composed services:
postgres
,adminer
,goose
with Dockerfile entrypointdocker-compose up --build
-
Run goose standalone:
docker-compose run goose status docker-compose run goose create <name_of_migration> sql # edit db/migrations/<name_of_migration>.sql docker-compose run goose up
-
Check changes in adminer:
open 'http://localhost:8080/?pgsql=migrations-postgres&username=goose&db=goose&ns=public'