You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ketudb 698c081bb3
Make HTTPS sidecar optional
1 week ago
defaults Make HTTPS sidecar optional 1 week ago
tasks Make HTTPS sidecar optional 1 week ago Make HTTPS sidecar optional 1 week ago


This sets up a Docker web server on a CentOS 7 host with the following features:

  • Uses the jwilder/nginx-proxy container as the front-end proxy, which allows for automatic configuration of virtual hosts by environment variables.
  • Optionally uses the JrCs/docker-letsencrypt-nginx-proxy-companion container for LetsEncrypt, which allows for automatic issuance & renewals of LetsEncrypt certificates, configured with environment variables. It also automatically updates the vhosts in the nginx-proxy container with the configuration for the certificates. (when docker_web_setup_https_container: true)
  • Automatically pulls a repository from Git container a docker-compose file (or other script) which is used to configure the containers and environment variables.
    • It uses an SSH deploy key to accomplish this.

Vars & defaults

docker_web_http_port: 80 # The HTTP port that should be exposed by nginx-proxy
docker_web_https_port: 443 # The HTTPS port that should be exposed by nginx-proxy
docker_web_deploy_key: "{{ role_path }}/../../files/deploy_key" # The path to the SSH public key for the deploy key
docker_web_deploy_key_remote: "/tmp/git.deploy_key" # The path the SSH public key should be copied to on the server
docker_web_build_command: "cd /opt/web-containers && docker compose up -d" # The build command for the container repository - can be a bash script, python etc
  # Yum dependencies
  - python-setuptools
  - python-pip
  - git
  - docker-compose
  # Pip dependencies
  - docker

The following vars have no defaults and must be specified:

docker_web_git_repo: "" # the git repository to build containers from