https://github.com/birros/docker-traefik-mkcert
Traefik as reverse proxy for local development using Docker and mkcert
https://github.com/birros/docker-traefik-mkcert
docker mkcert traefik
Last synced: 7 months ago
JSON representation
Traefik as reverse proxy for local development using Docker and mkcert
- Host: GitHub
- URL: https://github.com/birros/docker-traefik-mkcert
- Owner: birros
- License: mit
- Created: 2021-02-09T22:43:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-16T14:13:41.000Z (over 4 years ago)
- Last Synced: 2025-01-16T22:24:46.833Z (9 months ago)
- Topics: docker, mkcert, traefik
- Language: Makefile
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Traefik as reverse proxy for local development
Scaffolding of a reverse proxy for local development :
1. [traefik][1] watch [docker][2] to detect new web services to be exposed
locally
2. [mkcert][3] is used as ssl provider for valid certificates in browsers## Setup (macOS)
```shell
$ brew install mkcert
$ brew install nss
$ mkcert -install
$ make # start
$ make down # stop
```Dashboard available here: https://dashboard.dev.localhost
## Example of web service (whoami)
```shell
$ make whoami-up # start
$ make whoami-down # stop
```Whoami available here: https://whoami.dev.localhost
## Remarks
By default only **linux** point addresses `.localhost` to
`localhost`, which is not necessarily the case on all systems. In this case a
solution could be to use dnsmasq to point the `.localhost` addresses
to `localhost`.### macOS
```shell
$ brew install dnsmasq
$ mkdir -pv $(brew --prefix)/etc/
$ echo 'address=/.localhost/127.0.0.1' >> $(brew --prefix)/etc/dnsmasq.conf
$ sudo brew services start dnsmasq
$ sudo mkdir -v /etc/resolver
$ sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/localhost'
````[1]: https://github.com/traefik/traefik
[2]: https://github.com/docker/docker-ce
[3]: https://github.com/FiloSottile/mkcert