Skip to content

Instantly share code, notes, and snippets.

@fmedery
Last active January 11, 2024 00:26
Show Gist options
  • Save fmedery/0b384fb8f64e03d90ec76899e3859461 to your computer and use it in GitHub Desktop.
Save fmedery/0b384fb8f64e03d90ec76899e3859461 to your computer and use it in GitHub Desktop.
exampe docker compose pour emby
  1. Installation du plugin compose
apt install -y docker-compose-plugin docker-compose
  1. crée le ficher compose dans un dossier specific (par exemple ~/emby/compose.yaml)

  2. exemple de mon ficher ~/emby/compose.yaml

version: "3"

services:
  emby:
    container_name: emby
    environment:
      - UID=1000 # user running emby inside the container
      - GID=1000 # group
      - TZ="America/New_York" #set local
    image: emby/embyserver
    ports:
      - 8096:8096
      - 8920:8920
    restart: unless-stopped #image will already star unless shutdown
    devices:
     - /dev/dri:/dev/dri  # useful for HW decoding
    volumes:
      - /pool01/Plex/Movies:/movies
      - /pool01/Plex/Music/:/music
      - /pool01/Plex/TV.series:/tvseries
      - /pool01/docker/emby/certs:/certs
      - /pool01/docker/emby/config:/config
  1. pour démarrer le container en forground (logs visible, parfait pour 1 test). Par defaut, docker cherche un fichier compose.yaml dans le répertoire courant
cd ~/emby/
docker compose up
  1. pour le lancer en backgroup (-d pour detached)
cd ~/emby/
docker compose up -d
  1. tu peux lancer bcp de containers en // dans le même docker compose (ici emby et watchtower)
version: "3"

services:
  emby:
    container_name: emby
    environment:
      - UID=1000 # user running emby inside the container
      - GID=1000 # group
      - TZ="America/New_York" #set local
    image: emby/embyserver
    ports:
      - 8096:8096
      - 8920:8920
    restart: unless-stopped #image will already star unless shutdown
    devices:
     - /dev/dri:/dev/dri  # useful for HW decoding
    volumes:
      - /pool01/Plex/Movies:/movies
      - /pool01/Plex/Music/:/music
      - /pool01/Plex/TV.series:/tvseries
      - /pool01/docker/emby/certs:/certs
      - /pool01/docker/emby/config:/config
      
  watchtower:
    container_name: watchtower
    image: containrrr/watchtower:latest
    environment:
      - WATCHTOWER_NOTIFICATION_URL=${WATCHTOWER_NOTIFICATION_URL} # the variable is inside a .env file inside the same folder
                                                                   # great to hide information    
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    command: --label-enable --schedule '@every 1h'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment