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

Support for env and secret files #137

Merged
merged 17 commits into from
Aug 31, 2023
Merged

Conversation

simondotm
Copy link
Owner

@simondotm simondotm commented Aug 31, 2023

Add support for function environment vars. Solution:

  • Firebase app generator adds environment folder
  • Function generator provides default empty .env, .env.local and .secret.local files in this dir
  • Add glob assets rule to functions project.json to copy them from parent firebase app environment folder when functions are built
  • Update sync generator to auto-rename the glob assets input dir rule if parent firebase app is renamed
  • Update getconfig target to place .runtimeconfig.json in the firebase app environment dir
  • Update functions in firebase.json to have ignore: [ "*.local" ] rule to prevent local files being deployed

Outcome is that functions get the common environment vars copied from the parent firebase app to their dist folder, which allows:

  1. .env* files to be deployed with function code
  2. *.local and .runtimeconfig.json files to be accessible to firebase emulator when serving locally

Documentation updates also in this PR.

@simondotm simondotm merged commit 2038f5c into main Aug 31, 2023
@simondotm simondotm deleted the 136-support-for-env-and-secret-files branch August 31, 2023 20:12
@Gurey
Copy link

Gurey commented Sep 15, 2023

Great stuff and great work!

We really like this project at our company and just started to use it.

Do you have any idea when this will be released?

@simondotm
Copy link
Owner Author

@Gurey thanks for the kind feedback. Hopefully in next week or so, I'm just finishing up some migration tooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for .env and .secret files
2 participants