Created
November 6, 2020 10:35
-
-
Save typetetris/1fa8a371a1963c9e5871df3fce625903 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
mkdir -p sandbox/db | |
initdb --auth=trust --auth-host=trust --auth-local=trust --pgdata=sandbox/db --encoding="UTF-8" --locale=C --username dev | |
echo "unix_socket_directories = '.'" >> sandbox/db/postgresql.conf | |
echo "port = 5431" >> sandbox/db/postgresql.conf | |
pg_ctl -w -D sandbox/db -l sandbox/dblogfile start | |
createdb -h localhost -p 5431 -U dev -w -E UTF-8 -l C -O dev dev | |
pg_ctl -D sandbox/db stop -m s | |
# using url=jdbc:postgresql://localhost:5431/dev in liquibase.properties | |
# using "host=localhost port=5431 user=dev dbname=dev" as connect string in some haskell program |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment