Skip to main content

Preview Deployment Locally

Right after initialized Mager for a project, you can start preview deployment locally by executing

mager dev

It will install http proxy and service that you have defined in mager.yaml. If this your first preview deployment locally you will need to trust certificate that generated by mkcert and add Traefik http proxy dashboard to your hosts.

sudo echo 'dashboard.traefik.wip 127.0.0.1' >> /etc/hosts
CAROOT=~/.mager/certs mkcert -install

Then finally you will need add another entry to your hosts file for your service host.

sudo echo 'your-service.com.wip 127.0.0.1' >> /etc/hosts