mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
36 lines
2.2 KiB
Markdown
36 lines
2.2 KiB
Markdown
# Docker for [Invoice Ninja](https://www.invoiceninja.com/) using [Traefik proxy](https://doc.traefik.io/traefik/)
|
|
|
|
## 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](https://cloudflare.com) receives and serves all SSL certificates for each service domain automaticly by issuing a wildcard SSL certificate.
|
|
|
|
## Requirements
|
|
|
|
1. A domain using the Cloudflare nameservers [Cloudflare Docs](https://developers.cloudflare.com/registrar/get-started/transfer-domain-to-cloudflare/)
|
|
1. An API token with at least the following permissions: `Zone:Read, Zone Settings:Read, DNS:Edit` [Cloudflare Docs](https://developers.cloudflare.com/fundamentals/api/)
|
|
|
|
## Usage
|
|
|
|
1. Either copy the [HTTP-01 docker-compose.override.yml](./examples/http-01/docker-compose.override.yml) to the repositorie's root directory for issueing ssl certificates via `http-01` challenge, or copy the [DNS-01 cloudflare docker-compose.override.yml](./examples/dns-01-cloudflare/docker-compose.override.yml) to use Cloudflare and `dns-01` challenge.
|
|
1. Set the Traefik proxy vars in the [env](../../env) file
|
|
1. Update the basic-auth username and password in [dynamic-http.yml](./config/dynamic-http.yml)
|
|
1. 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
|
|
|
|
```bash
|
|
docker compose logs -tf traefik
|
|
```
|
|
|
|
and check the official [Traefik Documentation](https://doc.traefik.io/traefik/).
|