Declare the data volume properly

This commit is contained in:
Tim Möhlmann
2018-11-18 23:48:20 +02:00
parent 79246cf2a3
commit a2b5b4d2e0
2 changed files with 7 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ def setup():
conn.close()
# Bootstrap the database if postgresql is running for the first time
if not os.path.exists('/var/lib/postgresql/data/pg_hba.conf'):
if not os.path.exists('/var/lib/postgresql/data/pg_wal'):
os.system("chown -R postgres:postgres /var/lib/postgresql")
os.system("su - postgres -c 'initdb -D /var/lib/postgresql/data'")