]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - docker-compose.yml
Merge pull request #1583 from ArthurHoaro/feature/bookmark-strict-types
[github/shaarli/Shaarli.git] / docker-compose.yml
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
11 version: '3'
12
13 networks:
14 http-proxy:
15
16 volumes:
17 traefik-acme:
18 shaarli-cache:
19 shaarli-data:
20
21 services:
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:1.7-alpine
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