Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added server port env variable #2

Closed
wants to merge 1 commit into from
Closed

Added server port env variable #2

wants to merge 1 commit into from

Conversation

reeseovine
Copy link
Contributor

Allows you to specify a custom port on the docker container (it would be the right-hand-side of the port mapping). I needed this because I want to route this container's traffic through gluetun and port 8000 is already taken.

@m0ngr31
Copy link
Owner

m0ngr31 commented Oct 5, 2021

I think the "docker" way of doing this would to just map the port at runtime: docker run ... -p 8080:8000 m0ngr31/eplustv

@reeseovine
Copy link
Contributor Author

Well like I said, I needed this for Gluetun which is a VPN routing container. How it works is you add network_mode: 'service:gluetun' to the containers you want to route through it and then map the ports you want accessible locally in the Gluetun container, so it basically acts as a proxy for local ports. Because port 8000 is already taken by the Gluetun web interface, my instance of EPlusTV needs a different port. Here's the relevant parts of my compose file:

  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    ports:
      - 8420:8000 # Web interface
      - 8421:8888 # HTTP proxy
      - 9117:9117
      - 8112:8112
      - 58846:58846/tcp
      - 8666:8666
      - 3776:3776 # EPlusTV

  eplustv:
    image: katacarbix/eplustv
    environment:
      - "ACCESS_URI='http://192.168.0.20:3776'"
      - "PORT=3776"
      - "ESPN_USER=${ESPN_USER}"
      - "ESPN_PASS=${ESPN_PASS}"
      - "START_CHANNEL=200"
    network_mode: 'service:gluetun'

It's a weird situation that I don't think many others would have but it's something I personally needed. If you don't want to merge it that's fine, I can just maintain my own fork with this feature. 🚀

@reeseovine
Copy link
Contributor Author

Oh wait, I just found out I can change Gluetun's web interface port so maybe this isn't an issue like I thought it was ¯\_(ツ)_/¯

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

Successfully merging this pull request may close these issues.

None yet

2 participants