We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d92cfd8 commit bb837deCopy full SHA for bb837de
docker/startup.sh
@@ -18,8 +18,11 @@
18
# under the License.
19
#
20
21
-/usr/lib/postgresql/13/bin/initdb -D /data/postgresql
22
-/usr/lib/postgresql/13/bin/pg_ctl -D /data/postgresql start
+# Start Postgres
+/usr/lib/postgresql/13/bin/pg_ctl -D /data/postgresql start || \
23
+ # If it fails, maybe the database is not intialized yet, so do it
24
+ (/usr/lib/postgresql/13/bin/initdb -D /data/postgresql && \
25
+ # Then try to start Postgres again
26
+ /usr/lib/postgresql/13/bin/pg_ctl -D /data/postgresql start)
27
createdb
28
psql -f /pulsar-manager/init_db.sql
-
0 commit comments