apk add postgresql
initdb -D /var/lib/postgresql/10/data --no-locale -E utf-8 -k
mkdir /var/run/postgresql
chown -R postgres:postgres /var/run/postgresql
su - postgres
vim /var/lib/postgresql/10/data/postgresql.conf
...
- listen_addresses = 'localhost'
+ listen_addresses = '127.0.0.1'
...
pg_ctl -D /var/lib/postgresql/10/data start