You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've searched through the current issues to make sure this feature hasn't been requested already.
Motivation
I like to test both devel and prod mode of the suite using the official docker image and mounting the code into it.
In this case, if a plugin is added to the g3w-admin, that needs to install some pip requirements, I do that in the docker-entrypoint.sh and mount it in the docker-compose file and set it in the same docker compose as the entrypoint to use.
This works well, but some of the commands in the original entrypoint shipped in this repo are not understood, probably due to the fact that the shell used on startup is not a bash.
There are only two small changes that can make the script compatible that I would like to propose.
Suggested solution
This is the diff I would propose for the enrtypoint file:
diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh
index 96c2a0a..7536d3f 100755
--- a/scripts/docker-entrypoint.sh+++ b/scripts/docker-entrypoint.sh@@ -6,7 +6,7 @@
figlet -t "G3W-SUITE Docker by Gis3w"
# Start XVfb
-if [[ -f /tmp/.X99-lock ]]; then+if [ -f /tmp/.X99-lock ]; then
rm /tmp/.X99-lock
fi
Xvfb :99 -screen 0 640x480x24 -nolisten tcp &
@@ -14,10 +14,11 @@ export DISPLAY=:99
export QGIS_SERVER_PARALLEL_RENDERING=1
# Start
cd /code/g3w-admin
# Activate the front end app settings
-if [[ "${FRONTEND}" =~ [Tt][Rr][Uu][Ee] ]] ; then+if echo "${FRONTEND}" | grep -iq "^true$"; then
the first double square brackets should not be necessary, since there is no pattern matching anyways. Therefore just a change to single brackets.
in the second case a case insensitive check on true is done, which could be solved using echo and grep
This allows proper startup of the overridden entrypoint.
Alternatives considered
No response
The text was updated successfully, but these errors were encountered:
Checklist
Motivation
I like to test both devel and prod mode of the suite using the official docker image and mounting the code into it.
In this case, if a plugin is added to the g3w-admin, that needs to install some pip requirements, I do that in the docker-entrypoint.sh and mount it in the docker-compose file and set it in the same docker compose as the entrypoint to use.
This works well, but some of the commands in the original entrypoint shipped in this repo are not understood, probably due to the fact that the shell used on startup is not a bash.
There are only two small changes that can make the script compatible that I would like to propose.
Suggested solution
This is the diff I would propose for the enrtypoint file:
This allows proper startup of the overridden entrypoint.
Alternatives considered
No response
The text was updated successfully, but these errors were encountered: