Compare commits

..

No commits in common. "d7ad8a395f267305aba8cf01049d310379826a59" and "cac1ca221eb38d6f9465a43d7ad7990b1268cff1" have entirely different histories.

3 changed files with 7 additions and 5 deletions

View file

@ -22,10 +22,10 @@ LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug LOG_LEVEL=debug
DB_CONNECTION=pgsql DB_CONNECTION=pgsql
DB_HOST="${PGHOST}" DB_HOST=127.0.0.1
DB_PORT=5432 DB_PORT=5432
DB_DATABASE=postgres DB_DATABASE=backend
DB_USERNAME=postgres DB_USERNAME=root
DB_PASSWORD= DB_PASSWORD=
SESSION_DRIVER=database SESSION_DRIVER=database

View file

@ -30,11 +30,13 @@
export PGDATA="$REPO_ROOT/.postgres" export PGDATA="$REPO_ROOT/.postgres"
export PGHOST="$PGDATA" export PGHOST="$PGDATA"
export PGUSER="postgres" export PGUSER="postgres"
export PGDATABASE="rabbigerzi"
if [ ! -d "$PGDATA" ]; then if [ ! -d "$PGDATA" ]; then
echo "[pg] initializing cluster at $PGDATA" echo "[pg] initializing cluster at $PGDATA"
initdb --auth=trust --username=postgres --no-locale --encoding=UTF8 >/dev/null initdb --auth=trust --username=postgres --no-locale --encoding=UTF8 >/dev/null
{ {
echo "listen_addresses = '127.0.0.1'"
echo "unix_socket_directories = '$PGDATA'" echo "unix_socket_directories = '$PGDATA'"
} >> "$PGDATA/postgresql.conf" } >> "$PGDATA/postgresql.conf"
fi fi

View file

@ -2,12 +2,12 @@ version: "0.5"
processes: processes:
postgres: postgres:
command: postgres -D "$PGDATA" -k "$PGDATA" -c listen_addresses= command: postgres -D "$PGDATA" -k "$PGDATA" -c listen_addresses=127.0.0.1
shutdown: shutdown:
signal: 2 signal: 2
readiness_probe: readiness_probe:
exec: exec:
command: pg_isready -h "$PGDATA" -d postgres -U postgres command: pg_isready -h "$PGDATA"
initial_delay_seconds: 1 initial_delay_seconds: 1
period_seconds: 2 period_seconds: 2