2 # Shaarli - Docker Compose example configuration
5 # - https://shaarli.readthedocs.io/en/master/Docker/#docker-compose
7 # Environment variables:
8 # - SHAARLI_VIRTUAL_HOST Fully Qualified Domain Name for the Shaarli instance
9 # - SHAARLI_LETSENCRYPT_EMAIL Contact email for certificate renewal
10 # - SHAARLI_DOCKER_TAG Shaarli docker tag to use
11 # See: https://hub.docker.com/r/shaarli/shaarli/tags
24 image: shaarli/shaarli:${SHAARLI_DOCKER_TAG}
29 - shaarli-cache:/var/www/shaarli/cache
30 - shaarli-data:/var/www/shaarli/data
32 traefik.domain: "${SHAARLI_VIRTUAL_HOST}"
33 traefik.backend: shaarli
34 traefik.frontend.rule: "Host:${SHAARLI_VIRTUAL_HOST}"
37 image: traefik:1.7-alpine
39 - "--defaultentrypoints=http,https"
40 - "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
41 - "--entrypoints=Name:https Address::443 TLS"
44 - "--docker.domain=${SHAARLI_VIRTUAL_HOST}"
45 - "--docker.exposedbydefault=true"
46 - "--docker.watch=true"
48 - "--acme.domains=${SHAARLI_VIRTUAL_HOST}"
49 - "--acme.email=${SHAARLI_LETSENCRYPT_EMAIL}"
50 - "--acme.entrypoint=https"
51 - "--acme.onhostrule=true"
52 - "--acme.storage=/acme/acme.json"
53 - "--acme.httpchallenge"
54 - "--acme.httpchallenge.entrypoint=http"
61 - /var/run/docker.sock:/var/run/docker.sock:ro