static-html server-wide runner
This application has a simple manifest file (author: Tim Berners-Lee
;) ) and tared data folder.
I think that our implementation, should be system-wide
. For this particular case, I imagine an nginx conf for every /data/user/static-file
.
In this folder (like every FOSIA package) there might be a CNAME file, and a corresponding SSL certificate. The nginx conf must take the appropriate decisions regarding these files. (It means either using it, or in case not present, using the default name scheme: user-name.indiehosters.net/service
with our certificate)
The folder /data/server-wide/static-html/
link to every per-user
folder.
There is also a /data/server-wide/static-html/site-available
link to /data/server-wide/static-html/site-available-{timestamp}/
.
Then, there is a process watching /data/*/static-html/CNAME,*.cert
directory for changes. In case of change, it must:
- re-render
nginx.conf
template of each relevant site./data/server-wide/static-html/site-available-{timestamp}/
- check nginx conf files
- update link
/data/server-wide/static-html/site-available
- start a new nginx with these confs
- re-render HAproxy/bouncer configuration to point to the new nginx docker (and kill the old one)
- re-render relevant DNS configuration template.
- clean (if any of the operations fail, it stops the pipeline)
For now, all the automatic part, I'll do by hand. But what do you think in a general manner about this?
(this implementation is compatible with multi servers if you reconfigure the main HAproxy)
Comments?