diff options
Diffstat (limited to 'docker-compose.yml')
-rw-r--r-- | docker-compose.yml | 56 |
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/ | ||
6 | version: '3' | ||
7 | |||
8 | networks: | ||
9 | http-proxy: | ||
10 | |||
11 | volumes: | ||
12 | traefik-acme: | ||
13 | shaarli-cache: | ||
14 | shaarli-data: | ||
15 | |||
16 | services: | ||
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 | ||