This repository is meant to be a starting point for working with nginx-proxy, docker-gen and docker-letsencrypt-nginx-proxy-companion by providing basic working bootstrapped examples that combines them.
Running docker containers can be done either using the command line interface (CLI), or using docker-compose
Replace all the default "site.example.com" and "mail@example.com" occurrences in docker-run/simple-site/docker-run.sh for your publicly accessible domain redirecting to the server running the script.
$ ./docker-run.sh
While docker-compose v1 file version isn't advised for starting new project, docker-gen hasn't yet officially resolved the issue raised by new networking in docker-compose v2, you might find it easier to stick with v1.
Replace all the default "site.example.com" and "mail@example.com" occurrences in docker-compose/v1/simple-site/docker-compose.yml for your publicly accessible domain redirecting to the server running the script.
$ docker-compose up
V2 support for docker-gen is being done through @almereyda's unofficial solution. See above for compose v1.
Replace all the default "site.example.com" and "mail@example.com" occurrences in docker-compose/v2/simple-site/docker-compose.yml for your publicly accessible domain redirecting to the server running the script.
First, you'll need to create an external docker network named 'nginx-proxy' (or change the name in compose file).
docker network create -d bridge nginx-proxy
You'll only need to do this once.
$ docker-compose up
You should use docker logs to see the output of your daemonized containers.
$ docker logs nginx
You can also checkout the docker-gen generated "default.conf" file using docker exec
$ docker exec -it nginx-gen cat /etc/nginx/conf.d/default.conf
If you want to help out the community, feel free to submit a PR with other examples for popular site/apps such as Wordpress, ghost...
I'll try to add some myself provided this repo gets enough stars.