Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `tls` label (alias of `tls-email`) #19

merged 2 commits into from Mar 10, 2019


None yet
2 participants
Copy link

HugoDF commented Mar 10, 2019

Closes #18

  • adds a tls label (that gets injected as the tls value if tls-email is not set)
  • update the docs

How to test:

Build container:

docker build -t caddy-gen-dev .

Create empty directory and have a docker-compose.yml file:

version: "3"
    container_name: caddy-gen
    image: "caddy-gen-dev:latest" # IMPORTANT
    restart: always
      - /var/run/docker.sock:/tmp/docker.sock:ro  # needs socket to read events
      - ./certs/acme:/etc/caddy/acme  # to save acme
      - ./certs/ocsp:/etc/caddy/ocsp  # to save certificates
      - "80:80"
      - "443:443"
      - whoami

  whoami:  # this is your service
    image: "katacoda/docker-http-server:v2"
      - ""  # your domain
      - "virtual.port=80"  # exposed port of this container
      - ""  # ssl is now on


docker-compose up


Creating test-caddy-gen-patch_whoami_1 ... done
Creating caddy-gen                     ... done
whoami_1     | Web Server started. Listening on
caddy-gen    | 2019/03/10 19:02:33 Generated '/etc/caddy/Caddyfile' from 2 containers
caddy-gen    | forego     | starting dockergen.1 on port 5000
caddy-gen    | forego     | starting caddy.1 on port 5100
caddy-gen    | dockergen.1 | 2019/03/10 19:02:33 Contents of /etc/caddy/Caddyfile did not change. Skipping notification ''
caddy-gen    | dockergen.1 | 2019/03/10 19:02:33 Watching docker events
caddy-gen    | dockergen.1 | 2019/03/10 19:02:34 Contents of /etc/caddy/Caddyfile did not change. Skipping notification ''
caddy-gen    | caddy.1    | Activating privacy features... 2019/03/10 19:02:34 [INFO] acme: Registering account for

Caddy attempted to create certificates with, which means virtual.tls gets injected as the tls directive value.

Alternatively, could attempt to use, switch out the image at for caddy-gen-dev:latest and switch virtual.tls-email for virtual.tls.


This comment has been minimized.

Copy link

sobolevn commented Mar 10, 2019


@sobolevn sobolevn merged commit 1b4c950 into wemake-services:master Mar 10, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.