diff --git a/README.md b/README.md index 8db7bb5..191be4c 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,17 @@ With the source being available it's also possible to produce custom builds directly using [Go][golang] or [GoReleaser][goreleaser]. +### Docker Compose + +An example configuration for [Docker Compose][dockercompose] is available in +`contrib/docker-compose`: + +```shell +env --chdir contrib/docker-compose docker-compose up +``` + + +[dockercompose]: https://docs.docker.com/compose/ [golang]: https://golang.org/ [goreleaser]: https://goreleaser.com/ [paperless-api]: https://docs.paperless-ngx.com/api/ diff --git a/contrib/docker-compose/.env b/contrib/docker-compose/.env new file mode 100644 index 0000000..0040911 --- /dev/null +++ b/contrib/docker-compose/.env @@ -0,0 +1 @@ +COMPOSE_PROJECT_NAME=prometheus-paperless-exporter diff --git a/contrib/docker-compose/config/auth-token.txt b/contrib/docker-compose/config/auth-token.txt new file mode 100644 index 0000000..2757e62 --- /dev/null +++ b/contrib/docker-compose/config/auth-token.txt @@ -0,0 +1 @@ +insecuretoken diff --git a/contrib/docker-compose/docker-compose.yml b/contrib/docker-compose/docker-compose.yml new file mode 100644 index 0000000..bd9c54f --- /dev/null +++ b/contrib/docker-compose/docker-compose.yml @@ -0,0 +1,14 @@ +--- +version: "3.7" +services: + exporter: + image: ghcr.io/hansmi/prometheus-paperless-exporter:latest + restart: on-failure + init: true + ports: + - 127.0.0.1:8081:8081 + env_file: exporter.env + volumes: + - ./config/:/etc/exporter:ro + +# vim: set sw=2 sts=2 et : diff --git a/contrib/docker-compose/exporter.env b/contrib/docker-compose/exporter.env new file mode 100644 index 0000000..5db29e0 --- /dev/null +++ b/contrib/docker-compose/exporter.env @@ -0,0 +1,5 @@ +PAPERLESS_URL=https://paperless.example.com +PAPERLESS_AUTH_TOKEN_FILE=/etc/exporter/auth-token.txt +PAPERLESS_SERVER_TIMEZONE=Australia/Sydney + +# vim: set sw=2 sts=2 et :