Skip to content

Commit

Permalink
Provide a Docker Compose example
Browse files Browse the repository at this point in the history
  • Loading branch information
virtualtam committed Jul 5, 2018
1 parent edb4a4d commit 9495550
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
.github
tests

# Docker Compose resources
docker-compose.env
docker-compose.yml

# Shaarli runtime resources
cache/*
data/*
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ doc/**/*.json export-ignore
doc/**/*.md export-ignore
.docker/ export-ignore
.dockerignore export-ignore
docker-compose.* export-ignore
Dockerfile* export-ignore
Doxyfile export-ignore
Makefile export-ignore
Expand Down
56 changes: 56 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
# Shaarli - Docker Compose script
#
# See:
# - https://shaarli.readthedocs.io/en/master/docker/shaarli-images/
version: '3'

networks:
http-proxy:

volumes:
traefik-acme:
shaarli-cache:
shaarli-data:

services:
shaarli:
image: shaarli/shaarli:master
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:
image: traefik
command:
- "--defaultentrypoints=http,https"
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
- "--entrypoints=Name:https Address::443 TLS"
- "--retry"
- "--docker"
- "--docker.domain=docker.localhost"
- "--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

0 comments on commit 9495550

Please sign in to comment.