Search Postgresql Archives

Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes thank you, I have tried specifying the port at the CLI too... that did not help.

But restarting PostgreSQL in my custom /docker-entrypoint-initdb.d/run-after-initdb.sh
has helped, even though I am not sure if it is the best way:

#!/bin/sh

LANGUAGES="de en fr nl pl ru"

createuser --username=postgres words

psql --username=postgres -c "GRANT USAGE ON SCHEMA public TO words;"
psql --username=postgres -c "ALTER USER words PASSWORD 'mypassword';"

for L in $LANGUAGES; do
    createdb --username=postgres --owner=words words_$L
    cd /dict/$L && psql words_$L < words_$L.sql
done

# Restart PostgreSQL to make it listen at localhost too
pg_ctl --options "-c listen_addresses='localhost'" --wait restart


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux