#pass railway variables to wrangler.toml ?

15 messages · Page 1 of 1 (latest)

median pivot
#

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?

daring escarpBOT
#

Project ID: 667d4812-9824-4718-a14c-19f33495e0fd

median pivot
#

667d4812-9824-4718-a14c-19f33495e0fd

hearty wedge
#

some toml interpreters have environment variable interpolation, most dont, otherwise you'd have to write something to interpolate the environment variables yourself

median pivot
#

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

hearty wedge
#

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

median pivot
#

I see

#

:/

hearty wedge
#

though I don't see what's stopping you from forking the repo and making the necessary changes?

median pivot
#

I'm doing exactly that, but my concern is this repo seems to use multiple cloudflare built-in features like KV

hearty wedge
#

wrangler.toml is a cloudflare config, so not applicable here at all

median pivot
#

So potentially this is a pain in the ass

gritty saffronBOT