Re 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Labkey as a docker container
  2. This git project contains everything required to start labkey as a docker container.
  3. ## Installation
  4. ### Prepare
  5. - Install [`docker`][docker] and [`docker-compose`][dockerCompose]
  6. - create a user `labkey` with `docker` privileges
  7. ```bash
  8. sudo adduser labkey
  9. sudo -G docker labkey
  10. ```
  11. - clone the software directly into home
  12. ```bash
  13. sudo su labkey
  14. git init .
  15. git remote add origin <repository-url>
  16. git pull origin master
  17. ```
  18. - run `bin/installLabkey.sh 22.3` to unzip the enclosed LabKey binary code and make appropriate links.
  19. - copy `bin/env.sh.sample` to `bin/env.sh` and set a secret `$PGPASS`, other settings are probably OK,
  20. check `$DOCKERCOMPOSE`
  21. - set the same value as `password` in `labkey/labkey.yml`
  22. ### Start containers
  23. Run `bin/startLabkey.sh`. This will do several things:
  24. - Download PostgreSQL image and initialize a persistent database at `~/postgresl/data`.
  25. - Build a combined tomcat/R image from a recent version of tomcat
  26. - Copy and link files from home to the server
  27. - Start the server
  28. ### Check the installation
  29. In principle, the service should be running at `http://localhost:8443/labkey`. Check output of inidividual
  30. components by:
  31. ```bash
  32. docker logs config-db-1
  33. docker logs config-web-1
  34. docker exec -it config-db-1 bash
  35. ```
  36. ### Expected errors
  37. Errors of the type `500: Unexpected server error` are common and related
  38. [docker]: https://docs.docker.com/engine/install/centos/
  39. [dockerCompose]: https://docs.docker.com/compose/install/