Sorry for bump this thread but I want to give my 2 cents
It would be nice to consider encapsulate gateway and http service in a couple of containers. This would create an immutable setup based on images you could automate from the git repository. External volume mounted to persistent data, capabilities and device added to the gateway container (due serial port access) and reverse proxy with Nginx (this part is already done in containers)
The great advantage of this setup is swap between version with no hassle and makes portability little bit easier. Ah, and migration from one old pi no new pi could be done in minutes.
Of course it is not easy to rearrange things but once done most of hardwork to new release could be automated and upgrades are secure in nature.