Scaffolding of a reverse proxy for local development :
- traefik watch docker to detect new web services to be exposed locally
- mkcert is used as ssl provider for valid certificates in browsers
$ brew install mkcert
$ brew install nss
$ mkcert -install
$ make # start
$ make down # stop
Dashboard available here: https://dashboard.dev.localhost
$ make whoami-up # start
$ make whoami-down # stop
Whoami available here: https://whoami.dev.localhost
By default only linux point addresses <subdomain>.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 <subdomain>.localhost
addresses
to localhost
.
$ 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'