Giter VIP home page Giter VIP logo

Comments (10)

keith-gamble avatar keith-gamble commented on June 12, 2024

As an update that may help in troubleshooting, it looks like it is because the commissioning web page is failing to accept that as a valid port number. If you cancel the commissioning before finalization, and try to manually enter port 80 there, you receive the following error message. However if you set it to 1024 or anything above the mentioned 1023, then it works fine.
image

from ignition-docker.

thirdgen88 avatar thirdgen88 commented on June 12, 2024

@kgamble96, thanks for the follow-up. In looking at this a bit more, I'm actually considering pulling out the GATEWAY_HTTP_PORT and GATEWAY_HTTPS_PORT definitions. In any of the use-cases that I've had, I never have had the need to have the gateway run on port 80/443 directly. Most of the time it is within a compose stack or utilizing a port publish from docker run. I'm interested in hearing more about your need to run it directly on port 80/443 in the container. I'd have to have it run as root in the container to bind to 80/443 (or anything less than 1024).

from ignition-docker.

thirdgen88 avatar thirdgen88 commented on June 12, 2024

Another reason why this becomes a bit more complicated is that I'd also need to adjust the health check (in addition to the commissioning). The commissioning is all within the entrypoint, so it is manageable to do via the same environment variable. The health check is part of the container definition and would have to be manually adjusted or overridden when running the container.

I could make it a build argument (similar to the IGNITION_UID and IGNITION_GID) so that you could customize it with your own build of the image (where it would be baked into the port EXPOSE and HEALTHCHECK in the Dockerfile and absorbed for init preset and commissioning activities via the subsequent environment variable (driven off the build arg)). Let me know if this would be an acceptable alternative, seems a bit less hacky, though you'd have to build the image yourself to tune that (not a huge deal I suppose).

from ignition-docker.

keith-gamble avatar keith-gamble commented on June 12, 2024

I work pretty consistently in perspective, and almost any project I have for a customer is setup on port 80 for "prettiness sake" when opening the client, so that they dont have to type ports in the URL.

I was just trying to leave my configuration the same, so that for the sake of digital twins I am able to ensure that all environment variables are the same. It is more a consistency thing between my Dev and Prod environments.

from ignition-docker.

keith-gamble avatar keith-gamble commented on June 12, 2024

I actually do already keep a self-maintained copy for working in the release candidates, in Perspective thats a pretty consistent need.

I already set my EXPOSE to 80 443 8000 8088 8043, I just didnt change the healthcheck

I am all for customizing my image in a way that will correct it if needed, I just didn't know the actual solution in how to do so

from ignition-docker.

thirdgen88 avatar thirdgen88 commented on June 12, 2024

Ahhh, okay, that makes sense. I think the way to go here is to leverage a reverse proxy to handle all of those duties. Many good reasons for this in addition to solving your needs. I will endeavor to democratize this type of implementation via my ignition-examples repo in the future. That'll turn on quite a few light bulbs for you I hope--having the reverse proxy handle things like SSL termination and also be able to integrate with Docker is pretty powerful (I use Traefik and it works wonders).

from ignition-docker.

thirdgen88 avatar thirdgen88 commented on June 12, 2024

FWIW, I'll leave this issue open, because I think what I outlined above re: a build argument is the "right" solution for offering that functionality for where it might be needed.

from ignition-docker.

keith-gamble avatar keith-gamble commented on June 12, 2024

Awesome!

Thank you so much, I look forward to seeing and better understanding the solution for my own needs anyway. In the meanwhile at least it allows me to change the port within the Gateway webpage with no issues

from ignition-docker.

thirdgen88 avatar thirdgen88 commented on June 12, 2024

@kgamble96, with kcollins/ignition:8.1.0 I actually have removed the GATEWAY_HTTP_PORT and GATEWAY_HTTPS_PORT options, since it doesn't really make sense for those to be manipulated unless, like you mentioned, some of the other things like the health checks and commissioning follows suit.

I have added hooks to the Public HTTP/HTTPS/Address settings, which should make everything play nicely with reverse proxies where you can then easily expose on 80/443. For now, the only other use case for the other port settings would be if you're placing the container directly on the host network, which I don't think is really necessary now.

If you agree, please feel free to close this issue. Thanks!

from ignition-docker.

thirdgen88 avatar thirdgen88 commented on June 12, 2024

Support has been added via #71 for the GATEWAY_HTTP_PORT, GATEWAY_HTTPS_PORT, and GATEWAY_GAN_PORT env vars (though they're not documented on the docs page) for use in situations like --network host on a Linux box. These features are upstream only and will only work with 8.1.8+. Feel free to evaluate via kcollins/ignition:8.1.8-rc1.

from ignition-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.