lizmap-docker-compose icon indicating copy to clipboard operation
lizmap-docker-compose copied to clipboard

inconsistency in the configure() procedure

Open MaxiReglisse opened this issue 9 months ago • 4 comments

There's a problem with variable assignment and use of the same variable in the configure() procedure.

source $INSTALL_SOURCE/env.default

docker run -it \
    -u $LIZMAP_UID:$LIZMAP_GID \
    --rm \
    -e INSTALL_SOURCE=/install \
    -e INSTALL_DEST=/lizmap \
    -e LIZMAP_DIR=$INSTALL_DEST \
    -e QGSRV_SERVER_PLUGINPATH=/lizmap/plugins \
    -v $INSTALL_SOURCE:/install \
    -v $INSTALL_DEST:/lizmap \
    -v $scriptdir:/src \
    --entrypoint /src/configure.sh \
    3liz/qgis-map-server:${QGIS_VERSION_TAG} _configure

Indeed, if you add the following lines to the env.default file:

INSTALL_SOURCE=/home/docker/lizmap-docker-compose
INSTALL_DEST=/home/docker/lizmap

And then you run the Docker command without modification, it can potentially create a conflict because you have defined INSTALL_SOURCE in both env.default and in the Docker command options. This could lead to unexpected issues as Docker will take the value specified in the Docker command options (in this case, /install) rather than the one defined in env.default.

what do you think of it?

Thanks in advance,

Ernest.

MaxiReglisse avatar Sep 11 '23 13:09 MaxiReglisse