Set PAYLOAD_PUBLIC_ env vars at runtime?

default discord avatar
oliverevans96
3 months ago
2

Hello,



It seems that

PAYLOAD_PUBLIC_*

env vars are substituted into frontend scripts at build time. I was just wondering whether there's any way to delay this substitution until runtime so that I don't have to rebuild my docker container to update my S3 endpoint.



Thanks,


Oliver

  • discord user avatar
    denolfe
    Payload Team
    3 months ago

    Hmm, this is an interesting problem. Since the bundle must be built before serving, I don't know of an easy way to accomplish this.



    Are you using the cloud storage plugin?

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.