nextgenhealthcare / connect-docker

Official Dockerfiles for Connect https://hub.docker.com/r/nextgenhealthcare/connect
Mozilla Public License 2.0
78 stars 51 forks source link

Entrypoint.sh Problems #18

Open rjcdoc opened 2 years ago

rjcdoc commented 2 years ago
  1. Plugins zip file does not overwrite existing plugins. If I restart my container that has existing plugins loaded the container trys to reinstall them and errors because the plugins already exists.

Code:

if [ $zipFileCount != 0 ]; then
    echo "Unzipping contents of /tmp/userextensions/ zips into /opt/connect/extensions"
    for f in /tmp/userextensions/*.zip; do unzip "$f" -d /opt/connect/extensions; done
    # removing the downloaded zip file
    rm -rf /tmp/userextensions
fi

Error:

Unzipping contents of /tmp/userextensions/ zips into /opt/connect/extensions
Archive:  /tmp/userextensions/alert-3.12.0.b2324.zip
replace /opt/connect/extensions/alert/alert-client.jar? [y]es, [n]o, [A]ll, [N]one, [r]ename:  NULL
(EOF or read error, treating as "[N]one" ...)
  1. Also, if anything fails inside the IF STATEMENT, then the command rm -rf /tmp/userextensions fails and subsequent runs cause an error because the entry point script runs command, mkdir /tmp/userextensions and fails because it already exists.
cturczynskyj commented 2 years ago

Are you persisting the state of the container, including the extensions folders and files, in a volume? You don't need to do that if you are using the EXTENSIONS_DOWNLOAD parameter since you probably only want them installed once in that scenario. If you are doing that, then you can probably just use the administrator to install the extensions and not use the EXTENSIONS_DOWNLOAD parameter. We do recommend persisting as little as possible from your container though.