Skip to content

Commit 85580f2

Browse files
committed
New script to export secrets to environment
1 parent 8a064a1 commit 85580f2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/server/bin/export_secrets.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set -o allexport
2+
while read k _ v;
3+
do
4+
eval $k=$v;
5+
export k;
6+
done < 'secrets.py'
7+
set +o allexport

src/server/bin/startServer.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
#!/bin/bash
12

23
# we may want to switch this to a script which logs output, etc?
34
echo "------------STARTING `date` ------------------"
45
set FLASK_APP=server/app.py
56
export FLASK_APP
6-
7+
source bin/export_secrets.sh
78
# This abomination ensures that the PG server has finished its restart cycle
89
echo "SLEEPING.. WAITING FOR DB"; sleep 5; echo "WAKING"; alembic upgrade head; echo "DB SETUP";
910
#; python -m flask run --host=0.0.0.0 --no-reload

0 commit comments

Comments
 (0)