Skip to content

Commit

Permalink
fix: add environment from runtime (#95)
Browse files Browse the repository at this point in the history
* fix: get environment from runtime

Signed-off-by: shiipou <[email protected]>

* add environment in dockerfile

Signed-off-by: shiipou <[email protected]>

* fix

* remove comment

* Update entrypoint.sh

---------

Signed-off-by: shiipou <[email protected]>
Co-authored-by: jonas.martinez <[email protected]>
Co-authored-by: Jonas Martinez <[email protected]>
  • Loading branch information
3 people authored Nov 2, 2023
1 parent 8cd35e5 commit e2ee7a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
sed -i "s|\${LENRA_SERVER_DOMAIN}|${LENRA_SERVER_DOMAIN}|g" /opt/bitnami/nginx/conf/server_blocks/nginx.conf
sed -i "s|\${LENRA_SERVER_URL}|${LENRA_SERVER_URL}|g" index.html
sed -i "s|\${SENTRY_CLIENT_DSN}|${SENTRY_CLIENT_DSN}|g" index.html
sed -i "s|\${ENVIRONMENT}|${ENVIRONMENT}|g" index.html
sed -i "s|\${OAUTH_CLIENT_ID}|${OAUTH_CLIENT_ID}|g" index.html
sed -i "s|\${OAUTH_BASE_URL}|${OAUTH_BASE_URL}|g" index.html
sed -i "s|\${OAUTH_REDIRECT_URL}|${OAUTH_REDIRECT_URL}|g" index.html
Expand Down
3 changes: 1 addition & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ void main() async {
});

debugPrint("Starting main app[debugPrint]: ${Config.instance.application}");

const environment = String.fromEnvironment('ENVIRONMENT');
String environment = Config.instance.environment;

var reportMode = LenraReportMode();
CatcherOptions debugOptions = CatcherOptions(
Expand Down

0 comments on commit e2ee7a7

Please sign in to comment.