#Is there a way to deploy a config file to Vercel?

5 messages · Page 1 of 1 (latest)

unkempt plank
#

I have a config file (.ts) that my application uses. It's too complex to simply use environment variables. Does anyone know of a way I can deploy this to Vercel? (It contains sensitive API information so I don't want it under source control)

leaden tundra
#

I dont think so 🤔 if you have too many settings maybe you could store it in a database? then you can fetch it in your app

#

an alternative would be to serialize a json with all the values into a single env var so its easier to assign in the project

#

or commit this complex config file for each env and only set env vars for the sensitive API keys

tawdry sigil
#

@unkempt plank another possible approach is to encrypt the file and add it to version control. Then add the encryption key to vercel. During build time (or run time) decrypt the file using the key stored in the env variables