infrastructure/roles/static_websites
2024-02-22 03:42:59 +01:00
..
defaults fix: Disable ansible lint for some parts 2023-10-14 00:21:16 +02:00
meta !chore(docker-compose): Remove deprecated docker-compose python library 2024-02-22 01:29:19 +01:00
tasks fix(docker-compose): Use docker compose plugin for validation 2024-02-22 03:42:59 +01:00
templates static_websites: Add /tmp as tmpfs in read-only 2021-07-15 12:06:07 +02:00
README.md static_websites: Add optional www. alias & missing hidden service header 2020-08-14 05:25:34 +02:00

static_websites

This role provides the ability to deploy various static sites with out docker containers in a very easy way.

Requirements

You will need to have docker, docker-compose and traefik installed or declared as dependencies with their respective roles.

This role assumes that you have setup traefik with an endpoint called websecure.

Role Variables

Please look at the defaults/main.yml for all available variables and their description.

Note: Lines that are commented out via # are usually still valid/used variables, but they are not defined by default, so they might enable a feature, when uncommenting/defining them!

Global variables, that are used:

  • proxy_network: Defined by the local traefik installation, this is the shared proxy network used by traefik to reach the containers. (optional)
  • proxy_hiddenservice: Defined by the local traefik installation, this is used to generate the alt-svc header for the alternative Tor domain. (optional)

Example config:

---
static_websites:
  example:
    image: docker.io/acme/example-site    # docker image, can include a tag
    domain: example.com                   # domain that is published by traefik
    certresolver: letsencrypt_cf          # specify traefik cert resolver (optional)
    www: true                             # Add www. as alias (optional)
    hsts:                                 # HSTS advanced settings (optinal)
      preloaded: true                     # enable preloaded header
      subdomains: true                    # enable all subdomains header
    nginx:
      readonly: true
      tmpfs:
        "/tmp/nginx-cache": 1M
  example2:
    image: docker.io/acme/example-docs
    domain: docs.example.com

Dependencies

  • docker
  • docker-compose
  • traefik

License

GPL-3.0-only