Skip to content
Snippets Groups Projects
Commit 9733843a authored by Arie Peterson's avatar Arie Peterson
Browse files

Merge branch '155-flask-commands-not-available' into 'main'

Resolve "flask commands not available"

Closes #155

See merge request stackspin/dashboard!133
parents 38ae75d6 40923892
No related branches found
No related tags found
No related merge requests found
......@@ -110,7 +110,11 @@ else:
logging.info("Running initialization code (dev mode).")
init_routines()
else:
logging.info("Not running initialization code (dev mode).")
logging.info("Not running initialization code (dev or cli mode).")
# This should not perform any actual migration, just load the
# flask_migrate extension so we can use `flask db` commands from the
# cli.
flask_migrate.Migrate(app, db)
app.register_blueprint(api_v1)
app.register_blueprint(web)
......
......@@ -8,7 +8,7 @@ metadata:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook": post-install
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": before-hook-creation
{{- if .Values.commonAnnotations }}
......@@ -46,9 +46,7 @@ spec:
value: http://kratos-public:80
command: ["/bin/bash", "-c"]
args:
- flask db upgrade;
{{- if .Release.IsInstall }}
flask cli user create $SETUP_EMAIL;
- flask cli user create $SETUP_EMAIL;
flask cli user setpassword $SETUP_EMAIL $SETUP_PASSWORD;
flask cli app create dashboard Dashboard;
flask cli user setrole $SETUP_EMAIL dashboard admin;
......@@ -57,5 +55,3 @@ spec:
flask cli user setrole $SETUP_EMAIL wekan admin;
flask cli user setrole $SETUP_EMAIL zulip admin;
flask cli user setrole $SETUP_EMAIL hedgedoc admin;
{{- end }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment