Skip to content

Commit 5a1b2a6

Browse files
committed
Add support for host mounts (fixes #94)
1 parent 5300472 commit 5a1b2a6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

run.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ if [ "$#" -ne 1 ]; then
2424
fi
2525

2626
if [ "$1" = "import" ]; then
27+
# Ensure that database directory is in right state
28+
chown postgres:postgres -R /var/lib/postgresql
29+
if [ ! -f /var/lib/postgresql/12/main/PG_VERSION ]; then
30+
sudo -u postgres /usr/lib/postgresql/12/bin/pg_ctl -D /var/lib/postgresql/12/main/ initdb -o "--locale C.UTF-8"
31+
fi
32+
2733
# Initialize PostgreSQL
2834
createPostgresConfig
2935
service postgresql start

0 commit comments

Comments
 (0)