Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment Variables in .env File Not Taking Effect After Uploading via Onboarding ZIP #528

Open
EsamHussein opened this issue Sep 14, 2023 · 2 comments
Labels
question Further information or guidance required

Comments

@EsamHussein
Copy link

EsamHussein commented Sep 14, 2023

Description of the bug:

After onboarding an application using a ZIP file that contains a .env file, the environment variables defined within the .env file don't seem to have any effect on the application.


Reproduction Steps:

  1. Prepare an application with a .env file containing specific environment variables.
  2. ZIP the application and its related files.
  3. Use the onboarding feature in AWS SaaS Boost to upload the ZIP file.
  4. Launch the application and verify if the environment variables from the .env file are in effect.

What did you expect to happen?

I expected that after onboarding the application using the ZIP file, the environment variables defined in the .env file would be set and in effect when the application runs.


What actually happened?

The environment variables defined within the .env file were not recognized or applied to the application after onboarding.


Environment:

  • AWS Region : us-east-1
  • AWS SaaS Boost Version : 2.2.3
  • Workload OS (Linux or Windows) : macOS
@EsamHussein EsamHussein added bug Something isn't working triage Needs categorization and prioritization labels Sep 14, 2023
@tomg-formpak
Copy link

@EsamHussein Hi, just out of curiosity, Is the bug you mentioned related to the feature - #465 ?

If possible, I would appreciate it if we could have a discussion about this so that the team can work towards a solution.

Thank you

@brtrvn brtrvn added question Further information or guidance required and removed bug Something isn't working triage Needs categorization and prioritization labels Oct 4, 2023
@brtrvn
Copy link
Contributor

brtrvn commented Oct 4, 2023

@EsamHussein this is a misunderstanding of what the "config" file is for. It does not effect the system environment of the SaaS application, it is simply a mechanism to provide arbitrary data per-tenant to the underlying SaaS application. What that SaaS application does with the information contained in the "config" archive is up to the application.

As Tom mentions above, we do have a feature request for altering the system's execution environment with arbitrary key/values, but this is not in place today.

If you're leveraging an application framework such as the Spring Framework, you may be able to alter the environment at runtime after the container has launched. Other application frameworks may have similar features.

Here's one such example of downloading the "config" ZIP file during your application's initialization, and applying the contents of a *.properties file to the application's environment. https://github.com/brtrvn/saas-boost-examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information or guidance required
Projects
None yet
Development

No branches or pull requests

3 participants