Deployment
Pre-built images are available on the Docker Hub.
Dolog learns about your containers by reading from the Docker socket, which has to be mounted into the Dolog container. You can verify it starts correctly via the following command:
docker run --rm \
-p 3000:3000 \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
butterhosting/dologA more realistic setup mounts a persistent volume for /opt/dolog/data, so the SQLite database holding your logs survives container restarts:
services:
dolog:
image: butterhosting/dolog
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./.htpasswd:/opt/dolog/.htpasswd:ro
- dolog-data:/opt/dolog/data
environment:
DOLOG_TIMEZONE: "Europe/Amsterdam"
DOLOG_RETENTION_TIME_WINDOW: "30d"
volumes:
dolog-data:Environment vars
When starting Dolog, the following environment variables can be specified.
| Variable | Options | Description |
|---|---|---|
DOLOG_LOGGING | debug, info, warn, error (default info) | Specifies Dolog's own logging level |
DOLOG_TIMEZONE | IANA time zone (default UTC) | Specifies the timezone in which timestamps are shown |
DOLOG_WEBHOOKS | optional | Specifies named webhooks used for alerting as whitespace-separated name=https://url.com pairs; outgoing requests will authenticate themselves by specifying name=https://user:pass@url.com URLs |
DOLOG_SUPPORT_TOKEN | optional | Specifies a Dolog support token; click here for more information |
The remaining environment variables define Dolog's policies for retention, throttling and alerting. These are described in the Configuration section, since each of them can also be set for a single container through a Docker label.
.htpasswd
Dolog supports HTTP Basic Authentication out of the box. To enable it, place a passwords file at /opt/dolog/.htpasswd using the standard Apache format with bcrypt hashes.
alice:$2b$10$0EhE06AyBn4shMGqCkJzqOIPGsYCJxO2mzbgCbfFQ4te5003PiYOK
bob:$2b$10$LbAfTfDmhD9SbroH.JVrc.uUpfNxVDDtjPDTvwE7UaCNnn3PxrQF2Which can be created as follows:
htpasswd -B -c .htpasswd aliceIf no passwords file is present, authentication is disabled. For any deployment exposed to the internet, you should either provide an .htpasswd or place Dolog behind a reverse proxy that handles it.
/data/
The /opt/dolog/data/ directory stores Dolog's internal SQLite database, containing all container logs.
Losing the data/ directory means losing your log history, so consider mounting /opt/dolog/data/ as a persistent volume.