Add support for host mounts (fixes #94)

This commit is contained in:
Alexander Overvoorde 2020-02-19 21:04:24 +01:00
parent 5300472417
commit 5a1b2a6b06

6
run.sh
View File

@ -24,6 +24,12 @@ if [ "$#" -ne 1 ]; then
fi fi
if [ "$1" = "import" ]; then if [ "$1" = "import" ]; then
# Ensure that database directory is in right state
chown postgres:postgres -R /var/lib/postgresql
if [ ! -f /var/lib/postgresql/12/main/PG_VERSION ]; then
sudo -u postgres /usr/lib/postgresql/12/bin/pg_ctl -D /var/lib/postgresql/12/main/ initdb -o "--locale C.UTF-8"
fi
# Initialize PostgreSQL # Initialize PostgreSQL
createPostgresConfig createPostgresConfig
service postgresql start service postgresql start