Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Conversation

leewc
Copy link

@leewc leewc commented Nov 25, 2024

Took awhile to figure out from https://www.reddit.com/r/selfhosted/comments/vxo7ga/filebrowser_multiple_directories/ and general searching.

Decided to raise a PR for it.

For the compose example, I used traefik, I had a bit more labels but not sure if repo owner wants to include traefik as example.

Traefik with labels + watchtower for upgrades.

services:
  filebrowser:
    image: filebrowser/filebrowser:s6
    container_name: filebrowser
    restart: unless-stopped
    volumes:
      - /docs:/srv/docs
      - /my-photos-videos:/srv/my-photos-videos
      - ./filebrowser:/database/
      - ./filebrowser:/config/
    environment:
      - PUID=1000
      - PGID=1000
    networks:
      - web
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.filebrowser.rule=Host(`files.example.com`)'
      - 'traefik.http.routers.filebrowser.entrypoints=https'
      - 'traefik.http.routers.filebrowser.tls.certResolver=primary'
      - 'traefik.http.routers.filebrowser.service=filebrowser'
      - 'traefik.http.services.filebrowser.loadBalancer.server.port=80'
      - 'traefik.docker.network=web'
      - 'com.centurylinklabs.watchtower.enable=true'

# Connect to pre-defined network so other containers with docker-compose can be discovered by Traefik
networks:
  web:
    external: true

Thank you for this awesome OSS project! Best one I have tried for self hosting thus far.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant