Deploy environment and Auto Deploy Setup
Setup an environment where more than one production sites can be deployed.
Needed:
-
A server for websites only. -
A global nginx instance on that server which only redirects to the custom app nginx instances of their docker containers. -
The config for the global file depends on knowledge of how to do this setup, then it should be possible to setup the server so, that completely new sites can be added completely automated as well. -
The auto deploy mechanism should pull any new images from the specified docker hub and also should re-use the same volume. (Volume data needs to be kept, and shall never be lost) Per App. -
Test domains can be made as subdomains on united-domains.de. Production domains can be made when the urls are known and are thus unknown for the development process. We rely on the test-domain(s). -
With these test domain(s) we can also already test the correct working behaviour of certbot. -
There should also be a mechanism which adds a new site to a certbot cron job table. -
There must also be an uninstall script on the main server which can either completely remove all variables, cron entries, nginx configs, docker images, volumes etc. from any specified app, from all apps, or it can temporarily deactivate any running apps. -
There must also be a fallback/auto-repair mechanism which polls the health of a docker-compose setup (of a running website) and in case it is down (when it should not), it should automatically do docker-compose up again.
Thus, the order of this task is:
- read about nginx proxy for sub-nginxes
- if knowledge is high enough, rent a new server
- install nginx and make a setup which can be triggered from outside the server (with secure keys) to add or remove sites. ...