Skip to content

Feature/implement traefik documentation #628

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

Merged
merged 4 commits into from
Oct 30, 2018
Merged

Feature/implement traefik documentation #628

merged 4 commits into from
Oct 30, 2018

Conversation

darkweak
Copy link
Contributor

No description provided.

Copy link
Contributor

@Mathieudewet Mathieudewet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


## Basic implementation

[Traefik](https://traefik.io) is a reverse proxy / load balancer that's easy, dynamic, automatic, fast, full-featured, open source, production proven, providing metrics, and integrating with every major cluster technologie
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technology

@@ -0,0 +1,122 @@
# Implement Traefik into API Platform dockerized
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Implement Traefik into API Platform dockerized
# Implementing Traefik Into API Platform Dockerized

@@ -0,0 +1,122 @@
# Implement Traefik into API Platform dockerized

## Basic implementation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Basic implementation
## Basic Implementation


## Basic implementation

[Traefik](https://traefik.io) is a reverse proxy / load balancer that's easy, dynamic, automatic, fast, full-featured, open source, production proven, providing metrics, and integrating with every major cluster technology
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[Traefik](https://traefik.io) is a reverse proxy / load balancer that's easy, dynamic, automatic, fast, full-featured, open source, production proven, providing metrics, and integrating with every major cluster technology
[Traefik](https://traefik.io) is a reverse proxy / load balancer that's easy, dynamic, automatic, fast, full-featured, open source, production proven, providing metrics, and integrating with every major cluster technology.


This tool will help you to define your own routes for your client, api and more generally for your containers.

Use this custom API Platform docker-compose.yml file which implements ready-to-use Traefik container configuration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Use this custom API Platform docker-compose.yml file which implements ready-to-use Traefik container configuration.
Use this custom API Platform `docker-compose.yml` file which implements ready-to-use Traefik container configuration.

Override ports and add labels to tell Traefik to listen the routes mentionned and redirect routes to specified container.


```--api``` Tell Traefik to generate a browser view to watch containers and IP/DNS associated easier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```--api``` Tell Traefik to generate a browser view to watch containers and IP/DNS associated easier
`--api` Tell Traefik to generate a browser view to watch containers and IP/DNS associated easier

Don't forget the db-data, then database won't work in this dockerized solution.

```localhost``` is a reserved domain referred in your ```/etc/hosts```.
If you want to implement custom DNS such as production DNS in local, just put them at the end of your ```/etc/host``` file like that :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you want to implement custom DNS such as production DNS in local, just put them at the end of your ```/etc/host``` file like that :
If you want to implement custom DNS such as production DNS in local, just put them at the end of your `/etc/hosts` file like that:


```
# /etc/hosts
...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
...
# ...

127.0.0.1 your.domain.com
```

If you do that, you'll have to update the nelmio part in your```api/.env``` and accept the URL specified
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you do that, you'll have to update the nelmio part in your```api/.env``` and accept the URL specified
If you do that, you'll have to update the `CORS_ALLOW_ORIGIN` environment variable `api/.env` to accept the specified URL.


If you do that, you'll have to update the nelmio part in your```api/.env``` and accept the URL specified

## Known problems
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Known problems
## Known Issues


## Known problems

Take care of your network, if it's a type B network it may not work because containers are in type B network and it will be in conflict with Traefik sub-network
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Take care of your network, if it's a type B network it may not work because containers are in type B network and it will be in conflict with Traefik sub-network
If your network is of type B, it may conflict with the traefik sub-network.

@darkweak
Copy link
Contributor Author

ping @dunglas

Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dunglas dunglas merged commit e06ae48 into api-platform:2.3 Oct 30, 2018
@dunglas
Copy link
Member

dunglas commented Oct 30, 2018

Thanks @darkweak!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants