Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Availability of ENV variables

default discord avatar
a.lamit3 years ago
2

Hello,



I am having an issue with availability of ENV variables.



Does environment need to be available at build time:

payload build

In my case, I'm implementing stripe example here:

https://payloadcms.com/docs/admin/webpack#aliasing-server-only-modules

Would

STRIPE_SECRET_KEY

have to be available at build time?



I'm building with github actions & docker.



Thanks in advance

  • discord user avatar
    jmikrut
    3 years ago

    So

    payload build

    really only builds the

    admin panel

    JS bundle for browsers



    and you do not need / want your

    STRIPE_SECRET_KEY

    to appear in your admin bundle for security reasons



    so no, that variable does not need to be present at build time

  • default discord avatar
    a.lamit3 years ago

    Thank you for the answer!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.