No Description

Andrej Studen acea3bc5bd Updating for versions of labkey beyond 22 1 week ago
bin acea3bc5bd Updating for versions of labkey beyond 22 1 week ago
config acea3bc5bd Updating for versions of labkey beyond 22 1 week ago
labkey bb26540f8d Updates for a smoother run, partcularly, files will be created with permissions identical to the user running the docker container, which is better for granulation 1 year ago
labkeyBase acea3bc5bd Updating for versions of labkey beyond 22 1 week ago
software 935463da32 Adding latest version of LabKey 1 week ago
tomcat8 8722064747 Adding option to set catalina in development mode 1 week ago
README.md 1be2bd2bf2 Updating instructions to run labkey as non-root user 1 week ago
Re 08162045ca Adding README.md 3 years ago

README.md

Labkey as a docker container

This git project contains everything required to start labkey as a docker container.

Installation

Prepare

sudo adduser labkey
sudo usermod -G docker labkey
  • clone the software directly into home
sudo su labkey
cd
git init .
git remote add origin <repository-url>
git pull origin master
  • run bin/installLabkey.sh 22.3 to unzip the enclosed LabKey binary code and make appropriate links.
  • copy bin/env.sh.sample to bin/env.sh and set a secret $PGPASS, other settings are probably OK, check $DOCKERCOMPOSE
  • set the same value as password in labkey/labkey.xml

Permissions

To run as non-root user labkey, files should have the proper permissions. I believe that starting from scratch, the neccesary files will be created with appropriate permissions. If using an old implementation or in case of troubles, the following directories should be owned by labkey:labkey on host machine:

~/software/src/LabKey22.3.2-3-community/*
~/labkey/externalModules
~/labkey/files

Start containers

Run bin/startLabkey.sh. This will do several things:

  • Download PostgreSQL image and initialize a persistent database at ~/postgresl/data.
  • Build a combined tomcat/R image from a recent version of tomcat
  • Copy and link files from home to the server
  • Start the server

Check the installation

In principle, the service should be running at http://localhost:8443/labkey. Check output of inidividual components by:

  docker logs config-db-1
  docker logs config-web-1
  docker exec -it config-db-1 bash
  

Add ggplot2 to R

Connect to running instance of labkey:

docker exec -it config_labkey-web_1 bash

Start R:

R

In R, installggplot2 with dependencies:

install.packages('ggplot2', repos='http://cran.us.r-project.org', dependencies=TRUE)

Install ggpubr

For ggpubr, install cmake first. When in config_labkey-web_1 do:

apt update
apt install cmake

Then, in R:

install.packages('ggpubr')

Manage postgresql

Create ${POSTGRES_DIR} directory as user that will be running the container. If you have trouble with initial setup, the base can be reset by deleting everything under postgresql/data.

Expected errors

Errors of the type 500: Unexpected server error are common and related