From 35a51e2ba879016a23fb23092ed754ba6aa19e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Fri, 13 Nov 2020 14:33:53 +0100 Subject: [PATCH] added apiKey in the conf file --- vagrant/bootstrap.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index ef0d98f..a2092b7 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -40,6 +40,7 @@ STATS_PORT='5005' STATS_DB_NAME='statsservice' STATS_DB_USER='sqlmonarcuser' STATS_DB_PASSWORD="sqlmonarcuser" +STATS_API_KEY="$(openssl rand -hex 32)" STATS_SECRET_KEY="$(openssl rand -hex 32)" @@ -247,6 +248,7 @@ return [ 'statsApi' => [ 'baseUrl' => 'http://127.0.0.1:$STATS_PORT' + 'apiKey' => '$STATS_API_KEY', ], ]; EOF" @@ -357,6 +359,7 @@ export STATS_CONFIG=production.py FLASK_APP=runserver.py poetry run flask db_create FLASK_APP=runserver.py poetry run flask db_init FLASK_APP=runserver.py poetry run flask client_create --name ADMIN --role admin +FLASK_APP=runserver.py poetry run flask client_create --name monarc --token $STATS_API_KEY sudo bash -c "cat << EOF > /etc/systemd/system/statsservice.service