X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=blobdiff_plain;f=docker-compose.yml;h=e8ea4271267fb4f02659b78ebf17295ebc9d73b6;hp=fc68bf30f038ef5697559c29160c187335f08b5b;hb=HEAD;hpb=81c801300b2912dc19a24314629ee550b1899d34 diff --git a/docker-compose.yml b/docker-compose.yml index fc68bf30..4ebae447 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,14 @@ --- -# Shaarli - Docker Compose script +# Shaarli - Docker Compose example configuration # # See: -# - https://shaarli.readthedocs.io/en/master/docker/shaarli-images/ +# - https://shaarli.readthedocs.io/en/master/Docker/#docker-compose +# +# Environment variables: +# - SHAARLI_VIRTUAL_HOST Fully Qualified Domain Name for the Shaarli instance +# - SHAARLI_LETSENCRYPT_EMAIL Contact email for certificate renewal +# - SHAARLI_DOCKER_TAG Shaarli docker tag to use +# See: https://hub.docker.com/r/shaarli/shaarli/tags version: '3' networks: @@ -15,7 +21,7 @@ volumes: services: shaarli: - image: shaarli/shaarli:master + image: shaarli/shaarli:${SHAARLI_DOCKER_TAG} build: ./ networks: - http-proxy @@ -28,14 +34,14 @@ services: traefik.frontend.rule: "Host:${SHAARLI_VIRTUAL_HOST}" traefik: - image: traefik + image: traefik:1.7-alpine command: - "--defaultentrypoints=http,https" - "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https" - "--entrypoints=Name:https Address::443 TLS" - "--retry" - "--docker" - - "--docker.domain=docker.localhost" + - "--docker.domain=${SHAARLI_VIRTUAL_HOST}" - "--docker.exposedbydefault=true" - "--docker.watch=true" - "--acme"