init-db.sh (305B)
1 #!/bin/bash 2 3 # set -o errexit 4 # set -o nounset 5 set -o xtrace 6 7 # enable logical replication for publications 8 sed -i 's/#wal_level = replica/wal_level = logical/' /var/lib/postgresql/data/postgresql.conf 9 pg_ctl restart 10 11 # import database schema 12 cat /schema/*.sql | psql -h /var/run/postgresql -U $PGUSERNAME