Chicken and egg problem: using the git directive

I have a self-hosted bitbucket server behind caddy (with the proxy directive) as well as some static sites (same server and caddy instance).

For those static sites I want to use the git directive to auto pull content changes from the corresponding repos on the bitbucket instance.

The start of caddy fails now as it can’t reach the repos during upstart. Chicken and egg problem. The static sites config depend on the proxy config of the bitbucket server.

It would be nice to be able to start the “proxy” before the static sites… Any ideas?


Instead of using the git directive to access your projects through the proxied external address, why not just set up the git to pull directly from your upstream?

I did that in the end. Run git via cron… The caddy directive would have been nice to keep the “config” in one place. Another way would be to point the git directive directly against the bitbucket backend on localhost without proxying through caddy. But then bitbucket is configured to be “reached” via a proxy. Not sure if the config allows for both access methods right now. Need to check. Thanks.

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