aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.dockerignore3
-rw-r--r--.gitattributes1
-rw-r--r--docker-compose.yml56
3 files changed, 60 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
index a0d28dc6..96fd31c5 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -4,6 +4,9 @@
4.github 4.github
5tests 5tests
6 6
7# Docker Compose resources
8docker-compose.yml
9
7# Shaarli runtime resources 10# Shaarli runtime resources
8cache/* 11cache/*
9data/* 12data/*
diff --git a/.gitattributes b/.gitattributes
index 9d22f11b..9a92bc37 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -35,6 +35,7 @@ doc/**/*.json export-ignore
35doc/**/*.md export-ignore 35doc/**/*.md export-ignore
36.docker/ export-ignore 36.docker/ export-ignore
37.dockerignore export-ignore 37.dockerignore export-ignore
38docker-compose.* export-ignore
38Dockerfile* export-ignore 39Dockerfile* export-ignore
39Doxyfile export-ignore 40Doxyfile export-ignore
40Makefile export-ignore 41Makefile export-ignore
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/
6version: '3'
7
8networks:
9 http-proxy:
10
11volumes:
12 traefik-acme:
13 shaarli-cache:
14 shaarli-data:
15
16services:
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