2018-06-27 01:20:22 +02:00
|
|
|
---
|
2018-07-01 16:02:35 +02:00
|
|
|
# Shaarli - Docker Compose example configuration
|
2018-06-27 01:20:22 +02:00
|
|
|
#
|
|
|
|
# See:
|
2020-11-09 10:36:13 +01:00
|
|
|
# - https://shaarli.readthedocs.io/en/master/Docker/#docker-compose
|
2018-07-01 16:02:35 +02:00
|
|
|
#
|
|
|
|
# Environment variables:
|
|
|
|
# - SHAARLI_VIRTUAL_HOST Fully Qualified Domain Name for the Shaarli instance
|
|
|
|
# - SHAARLI_LETSENCRYPT_EMAIL Contact email for certificate renewal
|
2020-11-09 10:36:13 +01:00
|
|
|
# - SHAARLI_DOCKER_TAG Shaarli docker tag to use
|
2023-03-17 16:10:05 +01:00
|
|
|
# See: https://github.com/shaarli/Shaarli/pkgs/container/shaarli/versions?filters%5Bversion_type%5D=tagged
|
2018-06-27 01:20:22 +02:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
networks:
|
|
|
|
http-proxy:
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
traefik-acme:
|
|
|
|
shaarli-cache:
|
|
|
|
shaarli-data:
|
|
|
|
|
|
|
|
services:
|
|
|
|
shaarli:
|
2023-03-17 16:10:05 +01:00
|
|
|
image: ghcr.io/shaarli/shaarli:${SHAARLI_DOCKER_TAG}
|
2018-06-27 01:20:22 +02:00
|
|
|
build: ./
|
|
|
|
networks:
|
|
|
|
- http-proxy
|
|
|
|
volumes:
|
|
|
|
- shaarli-cache:/var/www/shaarli/cache
|
|
|
|
- shaarli-data:/var/www/shaarli/data
|
|
|
|
labels:
|
|
|
|
traefik.domain: "${SHAARLI_VIRTUAL_HOST}"
|
|
|
|
traefik.backend: shaarli
|
|
|
|
traefik.frontend.rule: "Host:${SHAARLI_VIRTUAL_HOST}"
|
|
|
|
|
|
|
|
traefik:
|
2020-10-03 14:33:15 +02:00
|
|
|
image: traefik:1.7-alpine
|
2018-06-27 01:20:22 +02:00
|
|
|
command:
|
|
|
|
- "--defaultentrypoints=http,https"
|
|
|
|
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
|
|
|
|
- "--entrypoints=Name:https Address::443 TLS"
|
|
|
|
- "--retry"
|
|
|
|
- "--docker"
|
2020-11-09 10:36:13 +01:00
|
|
|
- "--docker.domain=${SHAARLI_VIRTUAL_HOST}"
|
2018-06-27 01:20:22 +02:00
|
|
|
- "--docker.exposedbydefault=true"
|
|
|
|
- "--docker.watch=true"
|
|
|
|
- "--acme"
|
|
|
|
- "--acme.domains=${SHAARLI_VIRTUAL_HOST}"
|
|
|
|
- "--acme.email=${SHAARLI_LETSENCRYPT_EMAIL}"
|
|
|
|
- "--acme.entrypoint=https"
|
|
|
|
- "--acme.onhostrule=true"
|
|
|
|
- "--acme.storage=/acme/acme.json"
|
|
|
|
- "--acme.httpchallenge"
|
|
|
|
- "--acme.httpchallenge.entrypoint=http"
|
|
|
|
networks:
|
|
|
|
- http-proxy
|
|
|
|
ports:
|
|
|
|
- 80:80
|
|
|
|
- 443:443
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
- traefik-acme:/acme
|