-
Notifications
You must be signed in to change notification settings - Fork 27
[WIP] Replace config scripts #232
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
Conversation
appinteractive
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
We still need a way to include environment variables on the server at runtime without compiling it to the frontend bundle.
My take on that were the dotenv files that are written by the shell scripts that have access to the environment vars at that point. -
All tries to access the process.env at runtime results in static values from buildtime as nuxt replaces them for security resons. Do your approach handles that case?
config/production.json
Outdated
| @@ -0,0 +1,4 @@ | |||
| { | |||
| "SENTRY_DNS_PRIVATE": "SENTRY_DNS_PRIVATE", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roschaefer how do you prevent this variable to be bundled to the client?
nuxt.config.js
Outdated
| API_PORT: config.get('API_PORT'), | ||
| BUILD_COMMIT: config.get('BUILD_COMMIT'), | ||
| DEPLOY_DATE: config.get('DEPLOY_DATE'), | ||
| SENTRY_DNS_PRIVATE: config.get('SENTRY_DNS_PRIVATE'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roschaefer EMBED_API_TOKEN & SENTRY_DNS_PRIVATE should no be bundled on the client as they are secrets!
c6a9240 to
ee4a406
Compare
nuxt.config.js
Outdated
| 'EMBED_API_URL', | ||
| 'SENTRY_DNS_PUBLIC', | ||
| 'MAPBOX_TOKEN', | ||
| 'MAINTENANCE', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@appinteractive this will expose only public environment variables to the client.
|
@appinteractive when I do |
cc2ab5d to
47de0a4
Compare
- no bash scripts * error prone * platform dependent)
|
OK, this branch cannot be merged without touching the |
Uh oh!
There was an error while loading. Please reload this page.