Skip to content

Commit

Permalink
Add support for host mounts (fixes #94)
Browse files Browse the repository at this point in the history
  • Loading branch information
Overv committed Feb 19, 2020
1 parent 5300472 commit 5a1b2a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ if [ "$#" -ne 1 ]; then
fi

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
createPostgresConfig
service postgresql start
Expand Down

1 comment on commit 5a1b2a6

@Derkades
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed my issue, thanks!

Please sign in to comment.