[odrs-web/readme-update: 20/22] Execute initdb in the entrypoint




commit 64acf01f1b103794818c349a09c1193525465340
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Fri Jun 3 13:16:10 2022 +0200

    Execute initdb in the entrypoint
    
    It seems to be idempotent and will create example users only if none
    exist.

 entrypoint | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/entrypoint b/entrypoint
index 1be65f5..7d4e36e 100755
--- a/entrypoint
+++ b/entrypoint
@@ -1,9 +1,11 @@
 #!/bin/bash
 set -euo pipefail
 
-export FLASK_APP=odrs/__init__.py 
+export FLASK_APP=odrs:app
 export SQLALCHEMY_TRACK_MODIFICATIONS=False
+
 flask db upgrade
+flask initdb
 
 while true; do python3 /opt/app-root/src/cron.py fsck ; sleep 43200 ; done &
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]