version: "2.1"
services:
  emulatorjs:
    networks:
      - traefik
    image: lscr.io/linuxserver/emulatorjs:latest
    container_name: emulatorjs
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Copenhagen
      - SUBFOLDER=/ #optional
    volumes:
      - /srv/emu/config:/config
      - /srv/emu/data:/data
    ports:
      - 3003:3000
      - 84:80
      - 4001:4001 #optional
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.emu.entrypoints=websecure"
      - "traefik.http.routers.emu.rule=Host(`spil.$DOMAIN_NAME`)"
      - "traefik.http.routers.emu.tls.certresolver=letsencr"
      - "traefik.docker.network=traefik"
      - "traefik.http.services.emu.loadbalancer.server.port=80"

networks:
  traefik:
    external: true