Docker for Invoice Ninja using Traefik proxy
Why use Traefik Proxy
Traefik is an open-source Edge Router that makes publishing your services a fun and easy experience. It receives requests on behalf of your system and finds out which components are responsible for handling them.
What sets Traefik apart, besides its many features, is that it automatically discovers the right configuration for your services. The magic happens when Traefik inspects your infrastructure, where it finds relevant information and discovers which service serves which request.
Traefik in combination with Cloudflare receives and serves all SSL certificates for each service domain automaticly by issuing a wildcard SSL certificate.
Requirements
- A domain using the Cloudflare nameservers Cloudflare Docs
- An API token with at least the following permissions:
Zone:Read, Zone Settings:Read, DNS:EditCloudflare Docs
Usage
- Either copy the HTTP-01 docker-compose.override.yml to the repositorie's root directory for issueing ssl certificates via
http-01challenge, or copy the DNS-01 cloudflare docker-compose.override.yml to use Cloudflare anddns-01challenge. - Set the Traefik proxy vars in the env file
- Update the basic-auth username and password in dynamic-http.yml
- Start the docker compose stack
A few seconds later, you should be able to visit https://${APP_URL_DOMAIN}:8080/dashboard/ and should be prompted for a username and password. If you have not changed it, it should be username and EncryptedPassword.
If there are no errors listed, you should be able to visit InvoiceNinja via ${APP_URL}.
Troubleshooting
If anything does not work as expected, consider checking Traefik's container logs via
docker compose logs -tf traefik
and check the official Traefik Documentation.