13 Replies
i tried adding the envs in zerops yml and it worked but when i did it via dashboard
it didn't work
😓

have you added reference to the variable to
build.envVariables ?
variables are not shared by default, imagine you'd set NODE_ENV=production to env secrets and it would automatically apply to your build containers - you wouldn't be able to build your app because npm would only install production deps 🙂
you should be able to do
https://docs.zerops.io/features/env-variables#between-build-and-runtime-environments🤔 okay
btw in general you shouldn't migrate inside build, but inside
run.initCommands, preferably along zsc execOnce $ZEROPS_appVersionId -- prisma migrate https://docs.zerops.io/references/zsc#execonce
because this way if you migrate in build and then it fails on later command, or fails to start the runtime container, or even just takes a while to finish deployment, your database might become incompatible with the API version currently running.. so doing it in init is much safer and zsc execOnce takes care of idempotency
see https://github.com/fxck/shopify-app-template-remix/blob/main/zerops.ymli've migrated to drizzle for personal reasons, will be deploying soon
i'll check thanks
https://github.com/spartan-ng/spartan/blob/main/zerops.yml drizzle example here
okay so i already have
AUTH_RESEND_KEY in env via web but when i push it says it can't find any why so?
even though i restarted the whole container before
🤔which container is saying that?
then i copy the same env and i add them to the zerops yml (specifically build container)
build container
secret variables can be accessed by both build and runtime right

okay got it
ohh i almost forgot that's how it worked 😠sucha bad memory
thanks for your time

