Astro vs CF Dashboard environment variables

Hey guys, I'm working on an Astro project and deploying it to CF Pages The problem i ran into is the following the secrets are read from .env whenever i push i have to change them so the prod variables will be deployed (i deploy it manually for now for testing) and the weird thing is the variables from the CF dashboard are not read why tf is this happens? Should i just remove the .env when deploying so the CF Dashboard vars will be loaded?
1 Reply
Elliot Hesp
Elliot Hesp4mo ago
An env file should only be for local development and not pushed to version control. The envs should always come from the runtime environment
Want results from more Discord servers?
Add your server