forked from sebsauvage/Shaarli
-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Provide a Docker Compose example
Closes #1010 TODO: - deploy on a VPS with an actual domain - write a supporting deployment guide / article See: - https://hub.docker.com/_/traefik/ - https://docs.traefik.io/configuration/backends/docker/ - https://docs.traefik.io/user-guide/docker-and-lets-encrypt/ - traefik/traefik#2798 - traefik/traefik#3298 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
- Loading branch information
1 parent
c429f28
commit f52a316
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SHAARLI_VIRTUAL_HOST=shaarli.local | ||
SHAARLI_LETSENCRYPT_EMAIL=foo@bar.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
version: '3' | ||
|
||
networks: | ||
http-proxy: | ||
|
||
volumes: | ||
traefik-acme: | ||
shaarli-data: | ||
|
||
services: | ||
shaarli: | ||
image: shaarli/shaarli:master | ||
build: ./ | ||
networks: | ||
- http-proxy | ||
volumes: | ||
- 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 |