Adjust quick start
This commit is contained in:
parent
8b47c5adf7
commit
598caf6f78
1 changed files with 9 additions and 9 deletions
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
title: "Traefik Getting Started Quickly"
|
title: "Traefik Getting Started Quickly"
|
||||||
description: "Looking to get started with Traefik Proxy quickly? Read the technical documentation to learn a simple use case that leverages Docker."
|
description: "Looking to get started with Traefik Proxy quickly? Read the technical documentation to see a basic use case that leverages Docker."
|
||||||
---
|
---
|
||||||
|
|
||||||
# Quick Start
|
# Quick Start
|
||||||
|
|
||||||
A Simple Use Case Using Docker
|
A Basic Use Case Using Docker
|
||||||
{: .subtitle }
|
{: .subtitle }
|
||||||
|
|
||||||
![quickstart-diagram](../assets/img/quickstart-diagram.png)
|
![quickstart-diagram](../assets/img/quickstart-diagram.png)
|
||||||
|
@ -19,9 +19,9 @@ version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
reverse-proxy:
|
reverse-proxy:
|
||||||
# The official v2 Traefik docker image
|
# The official v3 Traefik Docker image
|
||||||
image: traefik:v3.0
|
image: traefik:v3.0
|
||||||
# Enables the web UI and tells Traefik to listen to docker
|
# Enables the web UI and tells Traefik to listen to Docker
|
||||||
command: --api.insecure=true --providers.docker
|
command: --api.insecure=true --providers.docker
|
||||||
ports:
|
ports:
|
||||||
# The HTTP port
|
# The HTTP port
|
||||||
|
@ -63,7 +63,7 @@ services:
|
||||||
- "traefik.http.routers.whoami.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`](https://github.com/traefik/whoami "Link to whoami app on GitHub"), a web service that outputs information about the machine it is deployed on (its IP address, host, etc.).
|
||||||
|
|
||||||
Start the `whoami` service with the following command:
|
Start the `whoami` service with the following command:
|
||||||
|
|
||||||
|
@ -71,9 +71,9 @@ Start the `whoami` service with the following command:
|
||||||
docker-compose up -d whoami
|
docker-compose up -d whoami
|
||||||
```
|
```
|
||||||
|
|
||||||
Go back to your browser (`http://localhost:8080/api/rawdata`) and see that Traefik has automatically detected the new container and updated its own configuration.
|
Browse `http://localhost:8080/api/rawdata` and see that Traefik has automatically detected the new container and updated its own configuration.
|
||||||
|
|
||||||
When Traefik detects new services, it creates the corresponding routes so you can call them ... _let's see!_ (Here, we're using curl)
|
When Traefik detects new services, it creates the corresponding routes, so you can call them ... _let's see!_ (Here, we're using curl)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -H Host:whoami.docker.localhost http://127.0.0.1
|
curl -H Host:whoami.docker.localhost http://127.0.0.1
|
||||||
|
@ -95,7 +95,7 @@ Run more instances of your `whoami` service with the following command:
|
||||||
docker-compose up -d --scale whoami=2
|
docker-compose up -d --scale whoami=2
|
||||||
```
|
```
|
||||||
|
|
||||||
Go back to your browser (`http://localhost:8080/api/rawdata`) and see that Traefik has automatically detected the new instance of the container.
|
Browse to `http://localhost:8080/api/rawdata` and see that Traefik has automatically detected the new instance of the container.
|
||||||
|
|
||||||
Finally, see that Traefik load-balances between the two instances of your service by running the following command twice:
|
Finally, see that Traefik load-balances between the two instances of your service by running the following command twice:
|
||||||
|
|
||||||
|
@ -119,6 +119,6 @@ IP: 172.27.0.4
|
||||||
|
|
||||||
!!! question "Where to Go Next?"
|
!!! question "Where to Go Next?"
|
||||||
|
|
||||||
Now that you have a basic understanding of how Traefik can automatically create the routes to your services and load balance them, it is time to dive into [the documentation](/) and let Traefik work for you!
|
Now that you have a basic understanding of how Traefik can automatically create the routes to your services and load balance them, it is time to dive into [the documentation](/ "Link to the docs landing page") and let Traefik work for you!
|
||||||
|
|
||||||
{!traefik-for-business-applications.md!}
|
{!traefik-for-business-applications.md!}
|
||||||
|
|
Loading…
Reference in a new issue