SenexCrenshaw / xTeVe

M3U Proxy and EPG aggregator for Plex DVR and Emby Live TV
MIT License
90 stars 10 forks source link

Running 2 xteve containers with different ports and config dirs #18

Closed yarafie closed 2 years ago

yarafie commented 2 years ago

Is your feature request related to a problem? Please describe. How can I modify the docker_file.yml to run 2 different containers with 2 different ports and config directory?

Describe the solution you'd like Would like an example of 2 differnt yml files

Describe alternatives you've considered N/A

Additional context N/A

SenexCrenshaw commented 2 years ago

There are a few ways. Example using docker-compose:

version: "2.1"
services:
  xteve1:
    image: senexcrenshaw/xteve:latest
    container_name: xteve
    environment:
      - TZ=America/New_York
    volumes:
      - /opt/configs/xteve1/config:/home/xteve/conf
      - /tmp/xteve1:/tmp/xteve:rw
    ports:
      - 34400:34400
    restart: unless-stopped

  xteve2:
    image: senexcrenshaw/xteve:latest
    container_name: xteve
    environment:
      - TZ=America/New_York
    volumes:
      - /opt/configs/xteve2/config:/home/xteve/conf
      - /tmp/xteve2:/tmp/xteve:rw
    ports:
      - 34401:34400
    restart: unless-stopped
yarafie commented 2 years ago

Thanks

not an expert in Docker or Compose

but Could i do something like the below to even change the internal port that the container uses?

version: "2.1" services: xteve-34400: image: senexcrenshaw/xteve:latest container_name: xteve-34400 environment:

yarafie commented 2 years ago

Also not an expert in git so pardon the incorrect indentation :)

SenexCrenshaw commented 2 years ago

You dont have to worry about the internal port.

ports:
      - 34400:34400

This exposes 34400 on your docker host to point to 34400 in the container

ports:
      - 34401:34400

This exposes 34401 on your docker host to point to 34400 in the container

Leave the container as is and just map it on the host side.

- XTEVE_PORT=34400 is not used

yarafie commented 2 years ago

Thanks

I actually have both containers running behind a reverse proxy and through a wireguard VPN. Got it working using different ports perfectly.

Thank you for all suggestions it helped me in creating the docker_compose.yml

SenexCrenshaw commented 2 years ago

Excellent!