Giter VIP home page Giter VIP logo

traefik-file-config-example's Introduction

Traefik 1.7 - File Config Example

Screenshot

๐Ÿ“š Official Documentation

Installation

Before starting, you need to update your /etc/hosts file:

$ sudo vim /etc/hosts

And past this line at the end of the file:

127.0.0.1   backend.localhost frontend.localhost

Install the project on your local machine:

$ git clone https://github.com/guillaumebriday/traefik-file-config-example.git
$ cd traefik-file-config-example/example
$ yarn install
$ yarn run nodemon index.js

Open a new terminal and setup Traefik:

$ brew install traefik
$ cd traefik-file-config-example
$ traefik -c traefik.toml

How to use it

Open http://localhost:8080 to see the Traefik Web UI.

Open http://backend.localhost to see your app on port 3000.

Open http://frontend.localhost to see your app on port 3001.

Open http://backend.localhost/github to be redirected to https://github.com/guillaumebriday/traefik-file-config-example.

Run curl to see the custom headers:

$ curl -I http://backend.localhost
...
X-Custom-Header: Leave a star
X-Frame-Options:

Uncomment the basicAuth related line in the rules.toml file to try basic auth on http://backend.localhost.

You can tail the log:

$ tail -f tmp/traefik.log
$ tail -f tmp/access.log

Contributing

Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.

License

This project is released under the MIT license.

traefik-file-config-example's People

Contributors

guillaumebriday avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

kgrvamsi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.