-
Notifications
You must be signed in to change notification settings - Fork 99
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
Use different ports behind nginx #25
Comments
I'm not experienced with Google Cloud, but the Docker container internally uses port 80 and AFAIK the host should not interfere with the internals of the container. When you start the container e.g. with |
Unfortunately the requirements Cloud Run has is for the container is to listen to whatever port is specified in the PORT env variable. Unfortunately I cannot specify which port they use - they say that they use "8080" but this shouldn't be relied on, the app should support the PORT env variable at best. I realize this is a bit of a limitation from the Cloud Run side as you usually have something to route to the container (using -p for docker bridge network, some reverse proxy, kubernetes service, ...) and it seems this is a bit unique to Cloud Run. Would be cool if this could be changed here to support the use case, since otherwise it would require forking and it seems like it wouldn't break anything for current users to support it. Since you already have support for the PORT env variable it would only require changing the internal ports of the frontend and service which are not exposed right now. To summarize, this is basically a feature request to support using PORT=8080 with the container :) BTW thank you very much for packaging this all up in an easy to use container! It's a fantastic time saver 😊 |
I'm having a similar issue when trying to use Cloud Run. Has anyone had any success with deploying this on GCP or have any recommendations? |
@kamshak I am facing the same issue here deploying on Cloud Run. Basically Cloud Run prefers listening on the port 8080 and as the container is using nginx i have replaced the default.conf file to make nginx expose port 8080 as given on the link - https://stackoverflow.com/questions/47364019/how-to-change-the-port-of-nginx-when-using-with-docker#:~:text=If%20you%20want%20to%20change,conf%20file%20inside%20the%20container.&text=navigating%20to%20localhost%3A3333%20in,to%20include%20the%20default%20nginx. ** Dockerfile ** FROM jgontrum/spacyapi:base_v2 The problem is that it gives a 502 error on hitting any api. Here are the logs: /usr/lib/python2.7/dist-packages/supervisor/options.py:461: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security. I can't figure out what is the problem here. Any help is appreciated. |
Hi, i'm trying to run this on google cloud run which requires to run on port 8080. Right now this port is used internally so it doesn't run when trying to use PORT=8080. Would it be possible to move the internal ports into a less frequently used port range? (like e.g. 32543)
The text was updated successfully, but these errors were encountered: