Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

felixs's avatar

Envoyer/Forge - sharing environment between servers with slight differences

Hi everyone!

I want to have worker servers that work on different horizon queues. So my idea was to create different environments for each worker. So far so good.

Because the environment of these workers only differs in one .env value I wonder if there is a way to utilize Envoyers Environment sharing feature. Ideally I could use Envoyer to sync the .env file but override the app environment to

#on server 1

APP_ENV=worker-1

#on server 2

APP_ENV=worker-2

etc. on the individual servers. What would be the best way to achieve this?

The big advantage would be that I'd only have to maintain the majority of .env variables in one place, so if I ever need to change anything from DB, redis, other third party services etc. I'd only have to do so in Envoyer. Is this possible? Or is there even a better way to solve this?

I'm at a loss right now, maybe I overlook something completely obvious right now. Appreciate any help!

0 likes
0 replies

Please or to participate in this conversation.