From 81c801300b2912dc19a24314629ee550b1899d34 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Wed, 27 Jun 2018 01:20:22 +0200 Subject: Provide a Docker Compose example Closes https://github.com/shaarli/Shaarli/issues/1010 See: - https://hub.docker.com/_/traefik/ - https://docs.traefik.io/configuration/backends/docker/ - https://docs.traefik.io/user-guide/docker-and-lets-encrypt/ - https://github.com/containous/traefik/pull/2798 - https://github.com/containous/traefik/issues/3298 Signed-off-by: VirtualTam --- docker-compose.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docker-compose.yml (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..fc68bf30 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,56 @@ +--- +# Shaarli - Docker Compose script +# +# See: +# - https://shaarli.readthedocs.io/en/master/docker/shaarli-images/ +version: '3' + +networks: + http-proxy: + +volumes: + traefik-acme: + shaarli-cache: + shaarli-data: + +services: + shaarli: + image: shaarli/shaarli:master + build: ./ + networks: + - http-proxy + volumes: + - shaarli-cache:/var/www/shaarli/cache + - shaarli-data:/var/www/shaarli/data + labels: + traefik.domain: "${SHAARLI_VIRTUAL_HOST}" + traefik.backend: shaarli + traefik.frontend.rule: "Host:${SHAARLI_VIRTUAL_HOST}" + + traefik: + image: traefik + 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.exposedbydefault=true" + - "--docker.watch=true" + - "--acme" + - "--acme.domains=${SHAARLI_VIRTUAL_HOST}" + - "--acme.email=${SHAARLI_LETSENCRYPT_EMAIL}" + - "--acme.entrypoint=https" + - "--acme.onhostrule=true" + - "--acme.storage=/acme/acme.json" + - "--acme.httpchallenge" + - "--acme.httpchallenge.entrypoint=http" + networks: + - http-proxy + ports: + - 80:80 + - 443:443 + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + - traefik-acme:/acme -- cgit v1.2.3 From a0c34a49765ecc2559ac51b62966b9785ff3a5a3 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Sun, 1 Jul 2018 16:02:35 +0200 Subject: Docs: Add an installation guide for Debian 9 + Docker Signed-off-by: VirtualTam --- docker-compose.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index fc68bf30..e8ea4271 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,13 @@ --- -# 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/guides/install-shaarli-with-debian9-and-docker/ +# +# Environment variables: +# - SHAARLI_VIRTUAL_HOST Fully Qualified Domain Name for the Shaarli instance +# - SHAARLI_LETSENCRYPT_EMAIL Contact email for certificate renewal version: '3' networks: -- cgit v1.2.3