This role installs [nginx-proxy](https://github.com/nginx-proxy/nginx-proxy) with [separated nginx container](https://github.com/nginx-proxy/docker-gen#separate-container-install).
It will not use the automated acme script because it uses webroot. To be more flexible, the suggested role to use is [acmesh-install-deploy](https://repo.theadam.eu/ansible-roles/acmesh-install-deploy) role, that installs acme.sh on host OS, can use DNS challenges and wildcard certs and is can be easily added to nginx-proxy with hooks.
More advantage of this solution is that it does not matter that if you use only nginx-proxy with certs or use proxy solutions, E.G. Cloudflare.
## Variables
Important variables in this role are the following
- nginx_proxy_container_name: Name of the nginx-proxy container. To be more flexible we use docker-compose files (not start only the container) but give an explicit name to this container to avoid the name changes.
- nginx_proxy_base_dir: Base dir of this project on the host OS.
- nginx_proxy_copy_files[]: Array, that need to be filled with dicts. Dicts are passed directly to [ansible.builtin.copy](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/copy_module.html) module if you want to add other files to the project.
> Note: You can do the copy in different step, E.G. if you copy back a backup. Ansible only changes files that requires it.
See the variables file for more variables.
## Template
It uses a docker-compose.yml.j2 template that can be easily replaced. However keep in mind that if you rerun this role Ansible will replace the remote docker-compose.yml file with the version that is here so do not change only on the remote side.