GithubHelp home page GithubHelp logo

christianhilbrands / docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from molgenis/docker

0.0 0.0 0.0 147 KB

Dockerfiles and docker-compose for MOLGENIS

License: GNU Lesser General Public License v3.0

Dockerfile 68.05% Shell 31.95%

docker's Introduction

Docker

Docker images for MOLGENIS applications.

Requirements

  • Git

  • Docker

  • Navigate to http://localhost:8081/ in your browser and verify that the page cannot be found

  • Both the molgenis images and the elastic search image require a 'large' amount of memory. It is therefore advised to supply the docker engine with a minimum of 4g memory when using the docker-compose file. Else elastic search will give indexing errors. Alternatively tryout the experimental feature branch that makes use of the 'UseCGroupMemoryLimitForHeap' java option to dynamically constrain memory usage.

Linux

On Linux, increase the operating system limits on mmap counts by running the following command as root:

sysctl -w vm.max_map_count=262144

To set this value permanently, update the vm.max_map_count setting in /etc/sysctl.conf.

Installation

git clone https://github.com/molgenis/docker.git

cd docker/molgenis/<latest_version>

You can see what the latest version is in the molgenis folder, for example 10.0.

Start MOLGENIS

docker-compose up

Navigate to http://localhost:80/ in your browser (http://localhost:8081/ for versions before MOLGENIS 8.2).

Stop MOLGENIS

Ctrl-C in the terminal

Remove installation

docker-compose down
docker volume prune

Start new MOLGENIS

docker-compose down
docker volume prune
git pull origin master
docker-compose up --force-recreate

Start MOLGENIS with profiles

From MOLGENIS 8.7 and up you can use profiles to turn on optional functionality. The available profiles are described in the README in each version's folder.

docker-compose --profile audit --profile opencpu up

Override the MOLGENIS image you want to use

Edit the .env file or export the variables in shell.

Example for .env file:

REGISTRY=registry.molgenis.org/molgenis/molgenis-app
TAG=PR-8000-1

Example for exporting variables in shell:

export REGISTRY=registry.molgenis.org/molgenis/molgenis-app
export TAG=PR-8000-1 

Start a docker with an existent database dump

Add volumes to your database in docker (db section of docker-compose file):

  - /directory/to/dbdump/on/your/machine:/docker-entrypoint-initdb.d

Comment out the "app" section of the docker-compose file.

docker-compose up

If the data seems to be loaded, press ctrl+c to gracefully shut down the containers.

Revert the changes you did in your docker-compose file.

Restart your docker using:

docker-compose up

*Note: this is just for restoring a database dump, the filestore is not included.

Making db dump from docker

If you want to make a database dump from your docker to use somewhere else, add this line in the volumes of the db section of the docker-compose file:

  - /directory/to/save/your/dump/in/on/your/machine:/dump

*Note: it's best if the directory you choose to configure here is empty as it will be linked to your docker container

Now you can start your molgenis docker the way you are used to:

docker-compose up

Determine the id of your postgres container:

docker ps

Copy the id of the postgres container.

docker exec -it yourCopiedId bash

Now you can create your database dump.

pg_dump -U molgenis > /dump/yourpgdump.sql

The data will be stored in the directory you configured in the docker-compose file.

docker's People

Contributors

fdlk avatar tommydeboer avatar sidohaakma avatar dennishendriksen avatar marikaris avatar mark-de-haan avatar bartcharbon avatar connoratrug avatar maxpostema avatar jelmerveen avatar pneerincx avatar akuperus avatar jvanveen avatar christianhilbrands avatar connorstroomberg avatar marieke-bijlsma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.