How we got rid of .env

preview_player
Показать описание
If you're still using .env files it may be a sign you're missing some important concepts in your codebase. We walk through what those are and how SST (or any other IaC tool) can address them

Рекомендации по теме
Комментарии
Автор

This video does a good job of highlighting what the problem is and why you should care, but very little in terms of what to do about it. An example would've gone a long way, eg gist screenshot etc

crisea
Автор

Sorry, but I missed the part where you actually showed how and where the secrets should be stored?

Please create a follow-up implementation video.

aundefined
Автор

Okay but how do I run everything locally if the secrets aren't on my machine?

BritainRitten
Автор

Yeah cool but what if I want to develop offline? Like in a plane, on the beach or in rural Germany?

tailsonrails
Автор

When setting up SST, where/how do I setup an env variable for each stage? Is that done in a one time CLI flow? Would love to know more about that step of the setup process 🙂

koltongagnon
Автор

I don't get it, where is the database? are you hosting it as a service? And how can SST access my aws account without the keys? I'm so confused

oscarhagman
Автор

Amazing video. Didn't understand anything

HSBTechYT
Автор

Dude, I hit like and subscribe, and I feel a weight lifting off my mind already

HKnSLK
Автор

I almost agree. I think .env file for local dev works fine… but they should not be handled manually. If they are generated from the output from a iac-tool it works really well. I usually use pulumi to create my environments, then I can have a script reading the dev environment and generate the .env file for local development. For actual deployment I don’t use .env file, those should be set as proper env variables.

TomasJansson
Автор

wouldn't it be easier if you'd only use a .env for local development and .gitignore it? any deployment platform these days will have a place where you can set the environment variables without messing with files (aws, vercel, etc...)

MatheoxMattheox
Автор

I fell for it. Magical number "👍 420" - this guy

AdamLeis
Автор

It's funny to hear these two fragments back to back (1:30, 3:40) once you realize who is a creator of that sst thing. Practice makes perfect.

yumeyuki
Автор

Sorry the title should be, "Why you should get rid of .env files". You didn't explain this in practice!

zavierrodriguez
Автор

I'm not sure I understood what sst does. Or rather, I find the intro of your video very misleading because what you offer is not a solution to get rid of .env files. It's a solution that only works if you want to deploy on the cloud (AWS if I understood the basics of SST). But many projects can't use cloud : that's our case for my job. We host things on our own (sometimes internal) servers.
I feel like there can't be really a better way than .env files. Or rather, any other way would share the same downsides you describe.

Hexalyse
Автор

If it's YOUR .env file and no one else commits their own .env file to the repo, then it's YOUR responsibility to update credentials in YOUR .env file. You're only running it locally. You're CI/CD should be setting environment variables with stage specific values from secured sources.

CRWDMedia
Автор

.env is only meant for local development. Who pushes it to production???? Storing them elsewhere would be a open up the attack surface, and would still end up in memory. I don't see the benefits for local development.

dealloc
Автор

Cloud native dev lets goooo. This is so cool to see

sle
Автор

T3 stack solve all these issues, right?

toyin