pass railway variables to wrangler.toml ?

Hello, I would like to know if it's the same process to pass a railway variable to wrangler.toml file as dockerfile? E.g in dockerfile: ARG WHATEVER ENV xxx=$WHATEVER It's the same thing for wrangler.toml file?
Solution:
some toml interpreters have environment variable interpolation, most dont, otherwise you'd have to write something to interpolate the environment variables yourself
Jump to solution
11 Replies
Percy
Percy7mo ago
Project ID: 667d4812-9824-4718-a14c-19f33495e0fd
ENT3I <3
ENT3I <37mo ago
667d4812-9824-4718-a14c-19f33495e0fd
Solution
Brody
Brody7mo ago
some toml interpreters have environment variable interpolation, most dont, otherwise you'd have to write something to interpolate the environment variables yourself
ENT3I <3
ENT3I <37mo ago
okay, I think I found a way. Side question, can I use a repo that normally was made to be used on cloudflare worker? It contains a worker.js, a wrangler.toml and package.json and package-lock.json files I'm testing the compatibility to see if it works in Railway
Brody
Brody7mo ago
unlikely, while railway likes to say "just bring your code" that's unfortunately not true for many projects, a lot of projects will require slight modifications to work as expected
ENT3I <3
ENT3I <37mo ago
I see :/
Brody
Brody7mo ago
though I don't see what's stopping you from forking the repo and making the necessary changes?
ENT3I <3
ENT3I <37mo ago
I'm doing exactly that, but my concern is this repo seems to use multiple cloudflare built-in features like KV
Brody
Brody7mo ago
wrangler.toml is a cloudflare config, so not applicable here at all
ENT3I <3
ENT3I <37mo ago
So potentially this is a pain in the kekw
Brody
Brody7mo ago
highly likely
Want results from more Discord servers?
Add your server
More Posts