HI guys.
I'm pretty new with traefik and I've been reading articles since last year. I'm able to make it work but I'm having problem regarding adding an existing SSL to my apps. I'm running traefik 1.7 without any toml file for config because I'm still having problem on how to use the config toml.
My question is. It's because I already have multiple app that has ssl. How I'm gonna attach the the cert and key on each app?
Here's my traefik compose file.
version: '3.7'
services:
traefik:
image: traefik:1.7.13
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
command: >
--api
--docker
--docker.swarmMode
--docker.watch
--defaultentrypoints=http,https
--entrypoints='Name:http Address::80'
--entrypoints='Name:https Address::443 TLS'
--logLevel=INFO
--accessLog
--metrics
--metrics.prometheus
volumes:
- /var/run/docker.sock:/var/run/docker.sock
configs:
- source: traefik_htpasswd
target: /etc/htpasswd
networks:
- public
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
labels:
- "traefik.docker.network=public"
- "traefik.port=8080"
- "traefik.backend=traefik"
- "traefik.enable=true"
- "traefik.frontend.rule=PathPrefixStrip: /traefik"
- "traefik.frontend.auth.basic.usersFile=/etc/htpasswd"
- "traefik.frontend.entryPoints=http,https"
configs:
traefik_htpasswd:
file: ./htpasswd
networks:
public:
driver: overlay
attachable: true
name: public
Thanks guys.