Projeto teste para proxy reverse Traefik
- Docker
- Docker-compose
- Git
- mkcert
$ git clone [email protected]:leonardodg/traefik.git
Add Hosts file windows - After GET IP - Sample IP 127.0.0.1 AND HOST`s nginx.app.test,apache.app.test
$ echo. && echo 127.0.0.1 app.test >> %WINDIR%\System32\Drivers\Etc\Hosts
$ echo. && echo 127.0.0.1 nginx.app.test >> %WINDIR%\System32\Drivers\Etc\Hosts
$ echo. && echo 127.0.0.1 apache.app.test >> %WINDIR%\System32\Drivers\Etc\Hosts
Create networks that will be used by Traefik:
$ docker network create traefik_proxy
Run Traefik
$ docker-compose up -d
$ docker-compose -f ./docker/nginx.yml up -d
$ docker-compose -f ./docker/apache.yml up -d
[Dashboard] -> http://app.test:8080/dashboard/#/
[API] - > http://app.test:8080/api/rawdata
[Nginx] -> https://nginx.app.test/
[Apache] -> https://apache.app.test/ \
- Link Install mkcert -> https://github.com/FiloSottile/mkcert
If it's the firt install of mkcert, run
$ mkcert -install
Generate certificate for domain "docker.localhost", "domain.local" and their sub-domains
$ mkcert -cert-file certs/app.test.pem -key-file certs/app.test-key.pem app.test "*.app.test" apache.app.test nginx.app.test localhost 127.0.0.1 ::1
MIT