forked from shaarli/Shaarli
-
Notifications
You must be signed in to change notification settings - Fork 0
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 shaarli#1010 TODO: - deploy on a VPS with an actual domain - write a supporting deployment guide / article See: - https://hub.docker.com/r/jwilder/nginx-proxy/ - https://hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion/ - https://docs.docker.com/compose/environment-variables/ Signed-off-by: VirtualTam <[email protected]>
- Loading branch information
1 parent
c429f28
commit 0f27195
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=[email protected] |
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: | ||
- "/traefik" | ||
- "--acme" | ||
- "--acme.domain=${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" | ||
- "--docker" | ||
- "--docker.domain=docker.localhost" | ||
- "--docker.exposedbydefault=true" | ||
- "--docker.watch=true" | ||
- "--entrypoints='Name:http Address::80 Redirect.EntryPoint:https'" | ||
- "--entrypoints='Name:https Address::443 TLS::'" | ||
- "--retry" | ||
networks: | ||
- http-proxy | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock:ro | ||
- traefik-acme:/acme |