Open massmux opened 4 days ago
I'm working on it, basically the idea is to create a main docker-compose file with nginx and to prepare a dir for each stack, linking the docker-compose files of the stack into the main one with an include directive. Automation will add/remove stacks on demand.
The needed improvement is to improve the existing init script to able to add a new stack (belonging to a different domain name) to the same host. Below an idea on how to accomplish that result.
For example running the init script with the tag add. In this case the script should:
check if the system is already initialized. if not, abort and notify. Infact the first stack should be already installed and configured on the host
create a new docker-compose file for the new services, to be then run together with the main (see below)
create instances in the same way as the first stack, but in this case the domain should be added to the existing nginx container. The nginx container will always remain just one (it is intuitive). the idea is to create a new configuration file to be included by nginx at the start
Multiple File Call (Docker Recommended) in docker compose orchestration ● This method uses the -f option with the docker-compose command to call multiple YAML configuration files. ● Advantages: This is a straightforward approach endorsed by Docker. ●Example: ○ Create a common.yml file with shared services like a database. ○ Create individual files for other services, like app.yml. ○ Run docker-compose -f common.yml -f app.yml up to start all services