aboutsummaryrefslogtreecommitdiffhomepage
path: root/docker-compose.yml
diff options
context:
space:
mode:
authorAurélien Tamisier <virtualtam+github@flibidi.net>2018-07-27 19:25:52 +0200
committerGitHub <noreply@github.com>2018-07-27 19:25:52 +0200
commit8fdd65b88412a0db28c723a486650c434fe5668c (patch)
tree6bbadbcdb800a1655b846490e3db448a541c745b /docker-compose.yml
parentd8e4bf15355f328afbdb6567235702ef2c931041 (diff)
parenta0c34a49765ecc2559ac51b62966b9785ff3a5a3 (diff)
downloadShaarli-8fdd65b88412a0db28c723a486650c434fe5668c.tar.gz
Shaarli-8fdd65b88412a0db28c723a486650c434fe5668c.tar.zst
Shaarli-8fdd65b88412a0db28c723a486650c434fe5668c.zip
Merge pull request #1168 from virtualtam/docker/compose
Provide a Docker Compose example
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml61
1 files changed, 61 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 00000000..e8ea4271
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,61 @@
1---
2# Shaarli - Docker Compose example configuration
3#
4# See:
5# - https://shaarli.readthedocs.io/en/master/docker/shaarli-images/
6# - https://shaarli.readthedocs.io/en/master/guides/install-shaarli-with-debian9-and-docker/
7#
8# Environment variables:
9# - SHAARLI_VIRTUAL_HOST Fully Qualified Domain Name for the Shaarli instance
10# - SHAARLI_LETSENCRYPT_EMAIL Contact email for certificate renewal
11version: '3'
12
13networks:
14 http-proxy:
15
16volumes:
17 traefik-acme:
18 shaarli-cache:
19 shaarli-data:
20
21services:
22 shaarli:
23 image: shaarli/shaarli:master
24 build: ./
25 networks:
26 - http-proxy
27 volumes:
28 - shaarli-cache:/var/www/shaarli/cache
29 - shaarli-data:/var/www/shaarli/data
30 labels:
31 traefik.domain: "${SHAARLI_VIRTUAL_HOST}"
32 traefik.backend: shaarli
33 traefik.frontend.rule: "Host:${SHAARLI_VIRTUAL_HOST}"
34
35 traefik:
36 image: traefik
37 command:
38 - "--defaultentrypoints=http,https"
39 - "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
40 - "--entrypoints=Name:https Address::443 TLS"
41 - "--retry"
42 - "--docker"
43 - "--docker.domain=docker.localhost"
44 - "--docker.exposedbydefault=true"
45 - "--docker.watch=true"
46 - "--acme"
47 - "--acme.domains=${SHAARLI_VIRTUAL_HOST}"
48 - "--acme.email=${SHAARLI_LETSENCRYPT_EMAIL}"
49 - "--acme.entrypoint=https"
50 - "--acme.onhostrule=true"
51 - "--acme.storage=/acme/acme.json"
52 - "--acme.httpchallenge"
53 - "--acme.httpchallenge.entrypoint=http"
54 networks:
55 - http-proxy
56 ports:
57 - 80:80
58 - 443:443
59 volumes:
60 - /var/run/docker.sock:/var/run/docker.sock:ro
61 - traefik-acme:/acme