Skip to content

Commit

Permalink
Improvements for docker: debuglevel and google api key
Browse files Browse the repository at this point in the history
  • Loading branch information
gotthardp committed Apr 14, 2017
1 parent f604e5d commit 3580d29
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lorawan_server.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
{colored, true},
{handlers, [
% {lager_console_backend, debug},
{lager_file_backend, [{file, "log/error.log"}, {level, error}]},
{lager_file_backend, [{file, "log/console.log"}, {level, info}]}
{lager_file_backend, [{file, "log/debug.log"}, {level, debug}]},
{lager_file_backend, [{file, "log/error.log"}, {level, error}]}
]}
]},
{sasl, [
Expand Down
3 changes: 2 additions & 1 deletion priv/admin/admin-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* Google API key, which has Google Maps enabled. */
/* Google API key, which has Google Maps enabled.
set GOOGLE_MAPS_KEY environment variable to have this configured automatically */
var GoogleMapsKey = "";

/* end of file */
4 changes: 4 additions & 0 deletions scripts/lorawan-server
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ elif [ -L "$__possible_sys".orig ]; then
SYS_CONFIG="$__possible_sys"
fi

if [ ! -z $GOOGLE_MAPS_KEY ]; then
sed -i "s/GoogleMapsKey = \"[-a-zA-Z0-9]*\"/GoogleMapsKey = \"$GOOGLE_MAPS_KEY\"/g" $ROOT_DIR/lib/lorawan_server-*/priv/admin/admin-config.js
fi

cd $LORAWAN_HOME && erl -noinput +Bd -sname lorawan -pa $ROOT_DIR/lib/*/ebin -s lorawan_app -config $SYS_CONFIG $@

0 comments on commit 3580d29

Please sign in to comment.