R
Railway13mo ago
ENT3I <3

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
Percy13mo ago
Project ID: 667d4812-9824-4718-a14c-19f33495e0fd
ENT3I <3
ENT3I <3OP13mo ago
667d4812-9824-4718-a14c-19f33495e0fd
Solution
Brody
Brody13mo 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 <3OP13mo 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
Brody13mo 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 <3OP13mo ago
I see :/
Brody
Brody13mo ago
though I don't see what's stopping you from forking the repo and making the necessary changes?
ENT3I <3
ENT3I <3OP13mo ago
I'm doing exactly that, but my concern is this repo seems to use multiple cloudflare built-in features like KV
Brody
Brody13mo ago
wrangler.toml is a cloudflare config, so not applicable here at all
ENT3I <3
ENT3I <3OP13mo ago
So potentially this is a pain in the kekw
Brody
Brody13mo ago
highly likely
Want results from more Discord servers?
Add your server