Deployment

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/dolog

A 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.

VariableOptionsDescription
DOLOG_LOGGINGdebug, info, warn, error (default info)Specifies Dolog's own logging level
DOLOG_TIMEZONEIANA time zone (default UTC)Specifies the timezone in which timestamps are shown
DOLOG_WEBHOOKSoptionalSpecifies 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_TOKENoptionalSpecifies 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.uUpfNxVDDtjPDTvwE7UaCNnn3PxrQF2

Which can be created as follows:

htpasswd -B -c .htpasswd alice

If 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.