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

ACME + Docker-compose labels #1099

Closed
AurelienLavorel opened this issue Feb 2, 2017 · 2 comments
Closed

ACME + Docker-compose labels #1099

AurelienLavorel opened this issue Feb 2, 2017 · 2 comments

Comments

@AurelienLavorel
Copy link

AurelienLavorel commented Feb 2, 2017

What version of Traefik are you using (traefik version)?

Version:      v1.1.2
Codename:     camembert
Go version:   go1.7.4
Built:        2016-12-15_10:21:15AM
OS/Arch:      linux/amd64

What is your environment & configuration (arguments, toml...)?

1st docker-compose.yml

version: "2"
services:
  traefik:
    image: traefik:v1.1.2-alpine
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /dev/null:/traefik.toml
      - ./ssl:/etc/traefik/ssl
      - ./acme:/etc/traefik/acme
    command: --web -c /dev/null  --docker --logLevel=INFO --docker.watch --acme --acme.storage=/etc/traefik/acme/acme.json --acme.email=aurelien@lavoweb.net --acme.entryPoint=https --entryPoints='Name:http Address::80' --entryPoints='Name:https Address::443 TLS' --defaultentrypoints=http,https --acme.domains="unstickers.com"
    restart: always
    environment:
      - "affinity:container!=traefik*"
    networks:
      - web
networks:
  web:
    external:
      name: web

What did you do?

2nd docker-compose.yml

version: "2"
services:
  unstickers:
    image: httpd:2.4-alpine
    expose:
     - 80
     - 443
    volumes:
     - ./data:/usr/local/apache2/htdocs/
    labels:
     - "traefik.port=80"
     - "traefik.backend=unstickers"
     - "traefik.frontend.rule=Host:unstickers.com,www.unstickers.com"
     - "traefik.acme.domains=unstickers.com,www.unstickers.com"
    networks:
     - web
networks:
  web:
    external:
      name: web

What did you expect to see?

Creation of ACME certificate with unstickers.com AND www.unstickers.com.

What did you see instead?

Creation of ACME certificate with unstickers.com.

We can't configure ACME certificate outside of the main docker-compose.yml file, it's a design leak.

@mikeifomin
Copy link

mikeifomin commented Feb 4, 2017

you can with

config.toml

[acme]
OnHostRule = true

And I guess

labels:
     - "traefik.acme.domains=unstickers.com,www.unstickers.com"

does not allowed

@AurelienLavorel
Copy link
Author

Thank you, it work's :)

@ldez ldez added the area/acme label Jun 11, 2017
@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants