]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - docker-compose.yml
Merge pull request #1698 from ArthurHoaro/feature/plugins-search-filter
[github/shaarli/Shaarli.git] / docker-compose.yml
CommitLineData
81c80130 1---
a0c34a49 2# Shaarli - Docker Compose example configuration
81c80130
V
3#
4# See:
b7c50a58 5# - https://shaarli.readthedocs.io/en/master/Docker/#docker-compose
a0c34a49
V
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
b7c50a58
A
10# - SHAARLI_DOCKER_TAG Shaarli docker tag to use
11# See: https://hub.docker.com/r/shaarli/shaarli/tags
81c80130
V
12version: '3'
13
14networks:
15 http-proxy:
16
17volumes:
18 traefik-acme:
19 shaarli-cache:
20 shaarli-data:
21
22services:
23 shaarli:
b7c50a58 24 image: shaarli/shaarli:${SHAARLI_DOCKER_TAG}
81c80130
V
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:
bb176441 37 image: traefik:1.7-alpine
81c80130
V
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"
b7c50a58 44 - "--docker.domain=${SHAARLI_VIRTUAL_HOST}"
81c80130
V
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