You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, partykit deploywill look for.env and .env.local for its environment variables. However, when I do a deploy to a preview environment e.g. I'd like it to use .env.preview or .env.production for the production deploy.
Ideally, a --env-file=.env.preview would override the default file(s) used.
raimundo (kalendme.com): ran into this exact issue @joostschuur , the problem is that currently partykit automatically traverses directories up looking for a .env and if you have one, it also loads env vars from it
raimundo (kalendme.com): so if you happen to have a .env file near it it'll also source from it, silently overwriting the ones you passed
Another angle here is that for the partykit server, you usually want to only share a subset of the contents of your environment specific .env file, since your main app code will likely use different secrets and settings.
It would be nice to pick certain ones from the CLI (or partykit.json?) and use it in conjunction with dotenv -e .env.preview e.g..
Currently,
partykit deploy
will look for.env
and.env.local
for its environment variables. However, when I do a deploy to a preview environment e.g. I'd like it to use.env.preview
or.env.production
for the production deploy.Ideally, a
--env-file=.env.preview
would override the default file(s) used.Previously discussed on Discord, including this explanation:
Another angle here is that for the partykit server, you usually want to only share a subset of the contents of your environment specific
.env
file, since your main app code will likely use different secrets and settings.It would be nice to pick certain ones from the CLI (or
partykit.json
?) and use it in conjunction withdotenv -e .env.preview
e.g..This did not currently work though:
The text was updated successfully, but these errors were encountered: