Merge branch 'socket-only-postgres'

This commit is contained in:
Yisroel Baum 2026-06-13 21:29:10 +03:00
commit d7ad8a395f
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
3 changed files with 5 additions and 7 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=127.0.0.1 DB_HOST="${PGHOST}"
DB_PORT=5432 DB_PORT=5432
DB_DATABASE=backend DB_DATABASE=postgres
DB_USERNAME=root DB_USERNAME=postgres
DB_PASSWORD= DB_PASSWORD=
SESSION_DRIVER=database SESSION_DRIVER=database

View file

@ -30,13 +30,11 @@
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=127.0.0.1 command: postgres -D "$PGDATA" -k "$PGDATA" -c listen_addresses=
shutdown: shutdown:
signal: 2 signal: 2
readiness_probe: readiness_probe:
exec: exec:
command: pg_isready -h "$PGDATA" command: pg_isready -h "$PGDATA" -d postgres -U postgres
initial_delay_seconds: 1 initial_delay_seconds: 1
period_seconds: 2 period_seconds: 2