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
4 months ago
defaults Make HTTPS sidecar optional 4 months ago
tasks Make HTTPS sidecar optional 4 months ago
README.md Make HTTPS sidecar optional 4 months ago

README.md

ansible-role-docker-web-server

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
docker_web_yum_dependencies:
  # Yum dependencies
  - python-setuptools
  - python-pip
  - git
  - docker-compose
docker_web_pip_dependencies:
  # Pip dependencies
  - docker

The following vars have no defaults and must be specified:

docker_web_git_repo: "git@github.com:somebody/web-containers.git" # the git repository to build containers from