Skip to content

cardinalit/docker-ingress-traefik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-ingress-traefik

Build Status

Ingress based on Traefik:v2.2 and Docker Swarm with support TLS1.2 and TLS1.3 only.

How to use it?

  1. Clone this repo to your location:

    $> git clone https://github.com/cardinalit/docker-ingress-traefik.git
    $> cd docker-ingress-traefik/
  2. You can just run the command:

    $> ./ingress-up.sh your_email@example.ru

    or run commands bellow manually:

    2.1. Copy example files without postfix example:

    $> cp traefik/acme.example.json traefik/acme.json
    $> cp traefik/traefik.example.yml traefik/traefik.yml
    $> cp traefik/docker-compose.example.yml docker-compose.yml

    2.2. Replace email setting in traefik/traefik.yml:32 on your valid email address:

    29  certificatesResolvers:
    30    myResolver:
    31      acme:
    32        email: "your_email_here@example.com"
    33        storage: "/etc/traefik/acme.json"
    34        httpChallenge:
    35          entryPoint: web

    or you can run following commands without the edit manually:

    $> export MY_EMAIL=yourValidEmail@example.com 
    $> sed 's/your_email_here@example.com/'"$MY_EMAIL"'/g' -i traefik/traefik.yml

    2.3. Change rights on traefik/acme.json:

    $> chmod 0600 traefik/acme.json

    2.4. Run stack:

    $> docker stack up -c docker-compose.yml ingress
  3. After success running stack, you could see Traefik dashboard on http://${IP}:8080.

  4. Enjoy!

NOTES

All external configuration files you can move to traefik/traefik.conf.d/ without restart stack or container with ingress. Traefik will automatically read new files from there.