aboutsummaryrefslogtreecommitdiffhomepage
path: root/docker-compose.yml
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2018-06-27 01:20:22 +0200
committerVirtualTam <virtualtam@flibidi.net>2018-07-12 21:48:48 +0200
commit81c801300b2912dc19a24314629ee550b1899d34 (patch)
tree85a23d3abd7c3fa6f31821a8c1d9dcdfe8c9487e /docker-compose.yml
parentc9fcaaee931cca31e66ff594905e18e23a9f05ae (diff)
downloadShaarli-81c801300b2912dc19a24314629ee550b1899d34.tar.gz
Shaarli-81c801300b2912dc19a24314629ee550b1899d34.tar.zst
Shaarli-81c801300b2912dc19a24314629ee550b1899d34.zip
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 <virtualtam@flibidi.net>
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml56
1 files changed, 56 insertions, 0 deletions
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 @@
1---
2# Shaarli - Docker Compose script
3#
4# See:
5# - https://shaarli.readthedocs.io/en/master/docker/shaarli-images/
6version: '3'
7
8networks:
9 http-proxy:
10
11volumes:
12 traefik-acme:
13 shaarli-cache:
14 shaarli-data:
15
16services:
17 shaarli:
18 image: shaarli/shaarli:master
19 build: ./
20 networks:
21 - http-proxy
22 volumes:
23 - shaarli-cache:/var/www/shaarli/cache
24 - shaarli-data:/var/www/shaarli/data
25 labels:
26 traefik.domain: "${SHAARLI_VIRTUAL_HOST}"
27 traefik.backend: shaarli
28 traefik.frontend.rule: "Host:${SHAARLI_VIRTUAL_HOST}"
29
30 traefik:
31 image: traefik
32 command:
33 - "--defaultentrypoints=http,https"
34 - "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
35 - "--entrypoints=Name:https Address::443 TLS"
36 - "--retry"
37 - "--docker"
38 - "--docker.domain=docker.localhost"
39 - "--docker.exposedbydefault=true"
40 - "--docker.watch=true"
41 - "--acme"
42 - "--acme.domains=${SHAARLI_VIRTUAL_HOST}"
43 - "--acme.email=${SHAARLI_LETSENCRYPT_EMAIL}"
44 - "--acme.entrypoint=https"
45 - "--acme.onhostrule=true"
46 - "--acme.storage=/acme/acme.json"
47 - "--acme.httpchallenge"
48 - "--acme.httpchallenge.entrypoint=http"
49 networks:
50 - http-proxy
51 ports:
52 - 80:80
53 - 443:443
54 volumes:
55 - /var/run/docker.sock:/var/run/docker.sock:ro
56 - traefik-acme:/acme