Parse for env and vars

Just wondering if there is a way to ask the CLI what ENVS and VARS a CaddyFile expects ?

Would be nice… I dont know if the CLI has anything like this already…

I do a ton of caddy rollouts which is heavily automated and being able to Reflect off the Caddy file for these variables would help with automation.

What do you mean? I’m not sure I understand the problem statement. Please fill out the help topic template as per the forum rules. Without context of your config or how you run Caddy etc, it’s impossible to answer here.

You can use the caddy run --environ flag to have Caddy emit its current environment variables at startup.

(You can also run caddy environ but keep in mind this shows the env for the current user, so if you run Caddy as a different user or under systemd or whatever then this won’t tell you the truth).

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.