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

[APP REQUEST]: Traefik #203

Open
SkalCore opened this issue Oct 25, 2020 · 0 comments
Open

[APP REQUEST]: Traefik #203

SkalCore opened this issue Oct 25, 2020 · 0 comments
Labels
App Request Request for a new application

Comments

@SkalCore
Copy link

Dockerhub Link:

https://hub.docker.com/_/traefik

Description

Traefik is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy.

Traefik integrates with your existing infrastructure components (Docker, Swarm mode, Kubernetes, Marathon, Consul, Etcd, Rancher, Amazon ECS, ...) and configures itself automatically and dynamically.

Pointing Traefik at your orchestrator should be the only configuration step you need.

Separate Database?

no

Fill this out as best as you can. Documentation about these can be found here: https://www.portainer.io/documentation/how-to-use-templates/

version: "3.3"

services:

traefik:
image: "traefik:v2.3"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"

whoami:
image: "traefik/whoami"
container_name: "simple-service"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(whoami.localhost)"
- "traefik.http.routers.whoami.entrypoints=web"

Replace whoami.localhost by your own domain within the traefik.http.routers.whoami.rule label of the whoami service.
Run docker-compose up -d within the folder where you created the previous file.
Wait a bit and visit http://your_own_domain to confirm everything went fine. You should see the output of the whoami service. Something similar to:

Hostname: d7f919e54651
IP: 127.0.0.1
IP: 192.168.64.2
GET / HTTP/1.1
Host: whoami.localhost
User-Agent: curl/7.52.1
Accept: /
Accept-Encoding: gzip
X-Forwarded-For: 192.168.64.1
X-Forwarded-Host: whoami.localhost
X-Forwarded-Port: 80
X-Forwarded-Proto: http
X-Forwarded-Server: 7f0c797dbc51
X-Real-Ip: 192.168.64.1

@SkalCore SkalCore added the App Request Request for a new application label Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Request Request for a new application
Projects
None yet
Development

No branches or pull requests

1 participant