air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.38k stars 772 forks source link

Dynamic config reloading #465

Open eytan-avisror opened 10 months ago

eytan-avisror commented 10 months ago

It seems that air loads the config file in memory once when it starts up. This means that while air is running it cannot reload the config file if it is changed without fully restarting the process.

Would it be acceptable to add dynamic reloading of the config file when it changes?

This is primarily useful in cases where air runs in a container / kubernetes as the main process and you would like to avoid restarting the pod/container, but modify the config file on the fly - in our case we use mutagen to sync code from local to container, which works perfectly with air, but the only disadvantage is that you can't test changes to the air configuration without first pushing an image.