diff options
Diffstat (limited to 'build')
| -rwxr-xr-x | build/configure.sh | 26 | ||||
| -rw-r--r-- | build/frontend_config.json | 3 | ||||
| -rw-r--r-- | build/keys.json | 7 | ||||
| -rw-r--r-- | build/supervisord.conf | 4 |
4 files changed, 2 insertions, 38 deletions
diff --git a/build/configure.sh b/build/configure.sh index 75a61e7d..56f7f028 100755 --- a/build/configure.sh +++ b/build/configure.sh @@ -3,32 +3,6 @@ if [ ! -f "$1/opendc.db" ]; then sqlite3 "$1/opendc.db" < ./database/test.sql fi -if [ -z "$OAUTH_CLIENT_ID" ] -then - echo "OAuth client id not found. Define environment variable OAUTH_CLIENT_ID" - exit 1 -fi - -if [ -z "$OAUTH_CLIENT_SECRET" ] -then - echo "OAuth client secret not found. Define environment variable OAUTH_CLIENT_SECRET" - exit 2 -fi - -if [ -z "$SERVER_URL" ] -then - echo "URL of server not found. Define environment variable SERVER_URL" - exit 2 -fi - -sed -i "s/client-id/$OAUTH_CLIENT_ID/g" ./build/keys.json -sed -i "s/client-secret/$OAUTH_CLIENT_SECRET/g" ./build/keys.json - # ignore non ASCII characters LC_CTYPE=C LANG=C - -find ./opendc-frontend/build -type f -exec sed -i "s/the-google-oauth-client-id/$OAUTH_CLIENT_ID/g" {} \; -find ./opendc-frontend/build -type f -exec sed -i "s,https://opendc.ewi.tudelft.nl:443,$SERVER_URL,g" {} \; -find ./opendc-frontend/build -type f -exec sed -i "s,https://opendc.ewi.tudelft.nl,$SERVER_URL,g" {} \; -find ./opendc-frontend/build -type f -exec sed -i 's,LOCAL_MODE = (document.location.hostname === "localhost"),LOCAL_MODE = false,g' {} \;
\ No newline at end of file diff --git a/build/frontend_config.json b/build/frontend_config.json deleted file mode 100644 index bdaede00..00000000 --- a/build/frontend_config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "GOOGLE_OAUTH_CLIENT_ID": "the-google-oauth-client-id" -}
\ No newline at end of file diff --git a/build/keys.json b/build/keys.json deleted file mode 100644 index 6af01a9c..00000000 --- a/build/keys.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "OAUTH_CLIENT_ID": "client-id", - "OAUTH_CLIENT_SECRET": "client-secret", - "ROOT_DIR": "/opendc", - "FLASK_SECRET": "This is a super duper secret flask key", - "DATABASE_LOCATION": "/data/database/opendc.db" -}
\ No newline at end of file diff --git a/build/supervisord.conf b/build/supervisord.conf index 534eda29..05ceede2 100644 --- a/build/supervisord.conf +++ b/build/supervisord.conf @@ -2,7 +2,7 @@ nodaemon=true [program:web-server] -command=/usr/bin/python2.7 /opendc/opendc-web-server/main.py /opendc/build/keys.json +command=/usr/bin/python2.7 /opendc/opendc-web-server/main.py /opendc/keys.json stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr @@ -13,4 +13,4 @@ command=/bin/sh -c '/opendc/opendc-simulator/Simulator/simulator /data/database/ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0
\ No newline at end of file +stderr_logfile_maxbytes=0 |
