The following installation guide for the Goobi viewer refers to Ubuntu Linux 20.04. It is written as a step-by-step guide from top to bottom, meaning that settings and configurations build on each other. If the order is not followed, certain commands may fail.
VIEWER.EXAMPLE.ORG is used as the domain name in this manual, please adapt this to your own DNS name.
For productive use, a virtual machine with at least 4 CPUs and 8GB RAM is recommended.
Preparation
First, log on to the server on which the Goobi viewer is to be installed and obtain root rights:
sshVIEWER.EXAMPLE.ORGsudo-i
Then generate a password for the Goobi viewer database and a token and store them as a variable in the session. The DNS name is also stored there:
sed-e"s|VIEWER.EXAMPLE.ORG|${VIEWER_HOSTNAME}|g"-e"s|TOKEN|${TOKEN}|g"<<"EOF">/etc/cron.d/intranda-goobiviewerPATH=/usr/bin:/bin:/usr/sbin/MAILTO=admin@intranda.com## Regular cron jobs for the Goobi viewer### These two scripts pull the theme git repository regulary. The @daily part is only ## a reminder for the 1-minute schedule#*/1 * * * * root cd /opt/digiverso/viewer/themes/goobi-viewer-theme-reference; git pull | grep -v -e "Already up.to.date." -e "Bereits aktuell."#@daily root echo "Please look at the git checkout interval for the Goobi viewer theme" | mail -s "Reference: Theme repository is checked out every minute" admin@intranda.com ## Optimize the Solr search index once a month@monthly root curl -s 'http://solr/solr/collection1/update?optimize=true&waitFlush=false'EOF
ATTENTION: If the installation is not available via HTTPS, then the files just created must be opened at this point and the schema must be adjusted manually.
my.cnf
For easier access to the database later, a my.cnf with the corresponding access data is stored for the root user:
For the installation, the Goobi viewer Docker git repository must be cloned:
cd /opt/digiverso/viewer/dev/
git clone https://github.com/intranda/goobi-viewer-docker
If you have your own theme, you must ensure that it can be loaded. If, for example, it is stored in its own Nexus server where access to the container is password-protected, then the access data must first be stored locally, for example:
The setup knows two possible environments. The default is the one for testing. For an installation in productive operation, files must be copied and possibly adapted.
First, copy the .env-production to the local Docker configuration directory, rename it and adjust values in it:
Then copy the docker-compose.yml and the solr folder and copy and rename the docker-compose.production.yml:
cp /opt/digiverso/viewer/dev/goobi-viewer-docker/docker-compose.yml /opt/digiverso/viewer/config/docker/docker-compose.yml
cp -a /opt/digiverso/viewer/dev/goobi-viewer-docker/solr /opt/digiverso/viewer/config/docker/
cp /opt/digiverso/viewer/dev/goobi-viewer-docker/docker-compose.production.yml /opt/digiverso/viewer/config/docker/docker-compose.override.yml
Now the containers can be started for the first time with the following commands:
cd /opt/digiverso/viewer/config/docker/
docker-compose up -d viewer-db solr
docker-compose exec solr solr zk upconfig -n goobiviewer -d /opt/goobiviewer
docker-compose exec solr solr create -c collection1 -n goobiviewer
docker-compose up -d
Create account
The Goobi viewer has a backend. The following command adds a test account to the database with the user name goobi@intranda.com and the password set at the beginning:
At the end, it is still necessary to check if there have been any changes in the Solr directory.
These points are in addition to the existing core and theme changelog.
General commands
Here are some commands documented to get into the containers, etc.
# Start all containers in the background.# remove -d to run them in the foregrounddocker-composeup-d# Show logfiles of a container# Possible values are solr, zookeeper, viewer, viewer-db, indexer, connector, proxydocker-composelogsindexer-f# Go into a docker containerdocker-composeexecviewer/bin/bash# Restart a docker containerdocker-composerestartindexer# Shutdowndocker-composedown# Update docker containerdocker-composepull
For example, vim can be installed in a container with the following command: