Expose nach Traefik

This commit is contained in:
Czechman 2021-12-08 09:33:06 +00:00
parent 976717328c
commit 37988ebda8
1 changed files with 21 additions and 2 deletions

View File

@ -30,6 +30,10 @@ version: '3.5'
# -------------------------------------------------------------------
# Note: All commands may have to be prefixed with "sudo" when not running as root.
# This will change the home directory "~" to "/root" in your configuration.
networks:
photoprism:
traefik:
external: true
services:
photoprism:
@ -46,6 +50,9 @@ services:
- apparmor:unconfined
# Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
user: "1000:1000"
networks:
- photoprism
- traefik
ports:
- "2342:2342" # [server]:[container]
environment:
@ -71,7 +78,7 @@ services:
PHOTOPRISM_DATABASE_NAME: "photoprism" # MariaDB database schema name
PHOTOPRISM_DATABASE_USER: "photoprism" # MariaDB database user name
PHOTOPRISM_DATABASE_PASSWORD: "zS&v5bATz2*NCS" # MariaDB database user password
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public PhotoPrism URL
PHOTOPRISM_SITE_URL: "https://pm.czechman.dynvpn.de/" # Public PhotoPrism URL
PHOTOPRISM_SITE_TITLE: "PhotoPrism"
PHOTOPRISM_SITE_CAPTION: "Browse Our Life"
PHOTOPRISM_SITE_DESCRIPTION: ""
@ -105,6 +112,18 @@ services:
- "/docker/photoprism/data/import:/photoprism/import"
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "/docker/photoprism/data/storage:/photoprism/storage"
labels:
- "traefik.docker.network=traefik"
- "traefik.enable=true"
- "traefik.backend=photoprism"
- "traefik.passHostHeader=true"
- 'traefik.frontend.rule=Host:pm.czechman.dynvpn.de;PathPrefixStrip: /'
- "traefik.frontend.auth.basic.users=McSeeno:$$2y$$13$$maYBYazCRDGmcKdSy/QA0eWBUEIpobxcUy.z68fnifcpoCqWm18wW"
# - "traefik.frontend.auth.basic.users=McSeeno:$$2y$$13$$maYBYazCRDGmcKdSy/QA0eWBUEIpobxcUy.z68fnifcpoCqWm18wW,gast:$$apr1$$cGUjveuw$$jbRcmTDOfAsqcc9FfsNvG0"
- "traefik.protocol=http"
- "traefik.port=2342"
- "traefik.frontend.auth.forward.trustForwardHeader=true"
- "traefik.frontend.auth.forward.tls.insecureSkipVerify=true"
mariadb:
restart: unless-stopped