51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
|
version: '3'
|
||
|
|
||
|
services:
|
||
|
reverse-proxy:
|
||
|
# The official v2 Traefik docker image
|
||
|
image: traefik:v2.5
|
||
|
# Enables the web UI and tells Traefik to listen to docker
|
||
|
command: --api.insecure=true
|
||
|
ports:
|
||
|
# The HTTP port
|
||
|
- "80:80"
|
||
|
- "443:443"
|
||
|
# The Web UI (enabled by --api.insecure=true)
|
||
|
- "8080:8080"
|
||
|
volumes:
|
||
|
# So that Traefik can listen to the Docker events
|
||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||
|
- ./traefik:/etc/traefik:ro
|
||
|
- ./certs:/certs:ro
|
||
|
fake-seafile:
|
||
|
image: php:apache-buster
|
||
|
volumes:
|
||
|
- ./fake-seafile:/var/www/html:ro
|
||
|
labels:
|
||
|
- traefik.http.routers.seafile.entrypoints=websecure
|
||
|
- traefik.http.routers.seafile.rule=Host(`seafile.local`)
|
||
|
- traefik.http.routers.seafile.tls=true
|
||
|
- traefik.http.services.seafile.loadbalancer.server.port=80
|
||
|
- traefik.http.routers.seafile.service=seafile
|
||
|
# - traefik.http.routers.seafile.tls.certresolver=letsencrypt
|
||
|
|
||
|
- traefik.http.routers.seafile-http.entrypoints=web
|
||
|
- traefik.http.routers.seafile-http.rule=Host(`seafile.local`)
|
||
|
- traefik.http.routers.seafile-http.middlewares=mid-to-https
|
||
|
- traefik.http.middlewares.mid-to-https.redirectscheme.scheme=https
|
||
|
- traefik.http.routers.seafile-http.service=seafile
|
||
|
|
||
|
- traefik.http.routers.seafhttp.entrypoints=websecure
|
||
|
- traefik.http.routers.seafhttp.rule=Host(`seafile.local`) && PathPrefix(`/seafhttp`)
|
||
|
- traefik.http.routers.seafhttp.tls=true
|
||
|
- traefik.http.services.seafhttp.loadbalancer.server.port=8082
|
||
|
- traefik.http.routers.seafhttp.service=seafhttp
|
||
|
- traefik.http.routers.seafhttp.middlewares=sf-strippath
|
||
|
- traefik.http.middlewares.sf-strippath.stripprefix.prefixes=/seafhttp
|
||
|
demo:
|
||
|
image: php:apache-buster
|
||
|
volumes:
|
||
|
- ./demo:/var/www/html:ro
|
||
|
ports:
|
||
|
- "8081:80"
|