We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d40b1b3 commit 702e9a7Copy full SHA for 702e9a7
1 file changed
database/bin/boot
@@ -48,6 +48,13 @@ until confd -onetime -node $ETCD -config-file /app/confd.toml; do
48
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
49
done
50
51
+# initialize database if one doesn't already exist
52
+# for example, in the case of a data container
53
+if [[ ! -d /var/lib/postgresql/9.3/main ]]; then
54
+ sudo -u postgres /usr/lib/postgresql/9.3/bin/initdb -D /var/lib/postgresql/9.3/main --locale=en_US.UTF-8
55
+ chown -R postgres:postgres /var/lib/postgresql
56
+fi
57
+
58
# ensure WAL log bucket exists
59
envdir /etc/wal-e.d/env /app/bin/create_bucket ${BUCKET_NAME}
60
0 commit comments