-
Notifications
You must be signed in to change notification settings - Fork 8
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
WIP: custom nginx port via env variable #35
Conversation
Upps, I found bug in alpine version. Please don't merge it yet, the start.sh need to be udpdated. |
3.4/arm_alpine/start.sh
Outdated
@@ -42,6 +42,8 @@ then | |||
echo "env[MOODOLE_DB_PORT] = '$MOODOLE_DB_PORT'" >> $PHP_FM_CONFIG | |||
fi | |||
|
|||
envsubst '$NGINX_PORT' < $NGINX_CONFIG.template > $NGINX_CONFIG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should put it in the top in every version because we need to render the template before adding manipulation
Done solving the render template problem. |
@mappuji I tried with the following docker-compose file on Raspberry Pi and it worked fine. Do we need to change both
|
Yes, you nailed it @xyb994 |
@xyb994 congrats - looks like we nailed it ... ... but I am very confused @mappuji and how do we convey to the users that they have to change all 3 numbers |
Let me explain, this part
is actually doing the job to change the port. but, this part
is a way we do it in docker compose, we redirect (bind) port 8080 in container to port 8080 in the host machine. |
What do you think @dogi ? Should I merge it or revise it? |
More info about port here https://docs.docker.com/compose/compose-file/compose-file-v2/#ports |
It is a bad idea to have a custom port, the better approach is bind the nginx server to |
After trial and error with #39 |
I think I'll just merge this one, will figure out if there unexpected issues. |
The number of changed files should be divisible by 4 since we have 4 version (x86 and arm for each Alpine and Debian) + 1 for readme 😉 .
It is an update for automatically detect nginx port
Solved #29