]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - docker-compose.yml
Merge pull request #1698 from ArthurHoaro/feature/plugins-search-filter
[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/#docker-compose
6 #
7 # Environment variables:
8 # - SHAARLI_VIRTUAL_HOST Fully Qualified Domain Name for the Shaarli instance
9 # - SHAARLI_LETSENCRYPT_EMAIL Contact email for certificate renewal
10 # - SHAARLI_DOCKER_TAG Shaarli docker tag to use
11 # See: https://hub.docker.com/r/shaarli/shaarli/tags
12 version: '3'
13
14 networks:
15 http-proxy:
16
17 volumes:
18 traefik-acme:
19 shaarli-cache:
20 shaarli-data:
21
22 services:
23 shaarli:
24 image: shaarli/shaarli:${SHAARLI_DOCKER_TAG}
25 build: ./
26 networks:
27 - http-proxy
28 volumes:
29 - shaarli-cache:/var/www/shaarli/cache
30 - shaarli-data:/var/www/shaarli/data
31 labels:
32 traefik.domain: "${SHAARLI_VIRTUAL_HOST}"
33 traefik.backend: shaarli
34 traefik.frontend.rule: "Host:${SHAARLI_VIRTUAL_HOST}"
35
36 traefik:
37 image: traefik:1.7-alpine
38 command:
39 - "--defaultentrypoints=http,https"
40 - "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
41 - "--entrypoints=Name:https Address::443 TLS"
42 - "--retry"
43 - "--docker"
44 - "--docker.domain=${SHAARLI_VIRTUAL_HOST}"
45 - "--docker.exposedbydefault=true"
46 - "--docker.watch=true"
47 - "--acme"
48 - "--acme.domains=${SHAARLI_VIRTUAL_HOST}"
49 - "--acme.email=${SHAARLI_LETSENCRYPT_EMAIL}"
50 - "--acme.entrypoint=https"
51 - "--acme.onhostrule=true"
52 - "--acme.storage=/acme/acme.json"
53 - "--acme.httpchallenge"
54 - "--acme.httpchallenge.entrypoint=http"
55 networks:
56 - http-proxy
57 ports:
58 - 80:80
59 - 443:443
60 volumes:
61 - /var/run/docker.sock:/var/run/docker.sock:ro
62 - traefik-acme:/acme