ghostgres
Run ephemeral PostgreSQL instances for testing in Docker.
Installation and Usage
Installing ghostgres from source:
git clone https://github.com/vcokltfre/ghostgres
cd ghostgres
go build && go install
or
go install github.com/vcokltfre/ghostgres@latest
Installing ghostgres from binary:
Visit the releases page and download the relevant file for your OS and architecture. Extract the downloaded file and place the binary somewhere in your PATH.
Running ghostgres:
ghostgres [INSTANCE NAME] [STARTUP SCRIPT]
Note: if no instance name is given a random 8-character string will be generated.
Note: When using a startup SQL script you may find you get a connection error when connecting to the database. This is because the database is not yet ready to accept connections. To fix this you can set the environment variable STARTUP_SECONDS
to a custom value. This is how long ghostgres will wait before running the startup script.