Fix Getting started

This commit is contained in:
Michael 2019-03-21 15:34:04 +01:00 committed by Traefiker Bot
parent 0f2c4fb5f4
commit 79ecff7b42
3 changed files with 5 additions and 8 deletions

View file

@ -5,9 +5,6 @@ A Simple Use Case Using Docker
![quickstart-diagram](../assets/img/quickstart-diagram.png) ![quickstart-diagram](../assets/img/quickstart-diagram.png)
!!! tip
To save some time, you can clone [Traefik's repository](https://github.com/containous/traefik).
## Launch Traefik With the Docker Provider ## Launch Traefik With the Docker Provider
Create a `docker-compose.yml` file where you will define a `reverse-proxy` service that uses the official Traefik image: Create a `docker-compose.yml` file where you will define a `reverse-proxy` service that uses the official Traefik image:
@ -18,7 +15,7 @@ version: '3'
services: services:
reverse-proxy: reverse-proxy:
image: traefik # The official Traefik docker image image: traefik # The official Traefik docker image
command: --api --docker # Enables the web UI and tells Traefik to listen to docker command: --api --providers.docker # Enables the web UI and tells Traefik to listen to docker
ports: ports:
- "80:80" # The HTTP port - "80:80" # The HTTP port
- "8080:8080" # The Web UI (enabled by --api) - "8080:8080" # The Web UI (enabled by --api)
@ -47,7 +44,7 @@ Edit your `docker-compose.yml` file and add the following at the end of your fil
whoami: whoami:
image: containous/whoami # A container that exposes an API to show its IP address image: containous/whoami # A container that exposes an API to show its IP address
labels: labels:
- "traefik.router.rule=Host:whoami.docker.localhost" - "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"
``` ```
The above defines `whoami`: a simple web service that outputs information about the machine it is deployed on (its IP address, host, and so on). The above defines `whoami`: a simple web service that outputs information about the machine it is deployed on (its IP address, host, and so on).

View file

@ -29,7 +29,7 @@ Attach labels to your containers and let Traefik do the rest!
my-container: my-container:
# ... # ...
labels: labels:
- traefik.http.services.my-container.rule=Host(my-domain) - traefik.http.routers.my-container.rule=Host(`my-domain`)
``` ```
??? example "Configuring Docker Swarm & Deploying / Exposing Services" ??? example "Configuring Docker Swarm & Deploying / Exposing Services"
@ -53,7 +53,7 @@ Attach labels to your containers and let Traefik do the rest!
my-container: my-container:
deploy: deploy:
labels: labels:
- traefik.http.services.my-container.rule=Host(my-domain) - traefik.http.routers.my-container.rule=Host(`my-domain`)
``` ```
!!! important "Labels in Docker Swarm Mode" !!! important "Labels in Docker Swarm Mode"

View file

@ -22,7 +22,7 @@ You can write these configuration elements:
``` toml ``` toml
# Enabling the file provider # Enabling the file provider
[providers.files] [providers.file]
[http] [http]
# Add the router # Add the router