1
0

feat(docker-compose): updated docker-compose with volumes

This commit is contained in:
sido 2018-03-17 22:08:07 +01:00
parent 747809d5a2
commit 9334c55e04
5 changed files with 63 additions and 42 deletions

View File

@ -2,15 +2,20 @@
Flexible software for scientific data
## Rancher configuration
This template creates a MOLGENIS stack on top of Rancher. It creates 3 docker services:
These templates can create a range of MOLGENIS stacks on top of Rancher. The latests and stable release serves 4 docker services:
- MOLGENIS
- MOLGENIS-OpenCPU
- Postgress
- ElasticSearch
## Usage
- Select MOLGENIS from catalog
- The stack-name must not be altered (this is hardcoded in de docker-compose file)
- Fill in the questions in the template area
- Click *Launch*
MOLGENIS can now be accessed over the Rancher network.
MOLGENIS can now be accessed over the Rancher network on the domains you specified.
## Loadbalancers
You can check lb.molgenis.org to check the availabity of the stack.

View File

@ -13,7 +13,7 @@ services:
environment:
- "db_uri=jdbc:postgresql://postgres/${DB_SCHEME}?reWriteBatchedInserts=true&autosave=CONSERVATIVE"
- "db_driver=org.postgresql.Driver"
- "db_user=${DB_USER}"
- "db_user=${DB_USERNAME}"
- "db_password=${DB_PASSWORD}"
- "admin.password={MOLGENIS_ADMIN_PASSWORD}"
- "elasticsearch.cluster.name=${ELASTIC_CLUSTER}"
@ -29,7 +29,7 @@ services:
postgres:
image: postgres:9.6-alpine
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_SCHEME}
- PGDATA=/var/lib/postgresql/data/pgdata

View File

@ -22,7 +22,7 @@
required: true
default: "molgenis"
type: "string"
- variable: "DB_USER_NAME"
- variable: "DB_USERNAME"
description: "Name of the database username"
label: "Database username:"
required: true

View File

@ -1,3 +1,6 @@
version: '2'
services:
molgenis:
image: registry.webhosting.rug.nl/molgenis/molgenis:stable
ports:
@ -5,18 +8,17 @@
links:
- postgres
- elasticsearch
volumes_from:
volumes:
- molgenis-data
environment:
- "db_uri=jdbc:postgresql://postgres/molgenis?reWriteBatchedInserts=true&autosave=CONSERVATIVE"
- "db_uri=jdbc:postgresql://postgres/${DB_SCHEME}?reWriteBatchedInserts=true&autosave=CONSERVATIVE"
- "db_driver=org.postgresql.Driver"
- "db_user=molgenis"
- "db_password=molgenis"
- "admin.password=admin"
- "elasticsearch.cluster.name=molgenis"
- "db_user=${DB_USERNAME}"
- "db_password=${DB_PASSWORD}"
- "admin.password={MOLGENIS_ADMIN_PASSWORD}"
- "elasticsearch.cluster.name=${ELASTIC_CLUSTER}"
- "elasticsearch.transport.addresses=elasticsearch:9300"
labels:
io.rancher.sidekicks: molgenis-data
io.rancher.container.pull_image: always
io.rancher.scheduler.global: true
traefik.frontend.rule: Host:${DOMAINS}
@ -27,16 +29,15 @@
postgres:
image: postgres:9.6-alpine
environment:
- POSTGRES_USER=molgenis
- POSTGRES_PASSWORD=molgenis
- POSTGRES_DB=molgenis
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_SCHEME}
- PGDATA=/var/lib/postgresql/data/pgdata
volumes_from:
volumes:
- postgres-data
ports:
- 5432
labels:
io.rancher.sidekicks: postgres-data
io.rancher.scheduler.global: true
opencpu:
@ -47,7 +48,7 @@
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.5.1
environment:
- "cluster.name=molgenis"
- "cluster.name=${ELASTIC_CLUSTER}"
- "bootstrap.memory_lock=true"
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- "xpack.security.enabled=false"
@ -55,32 +56,17 @@
memlock:
soft: -1
hard: -1
# volumes_from:
# - elasticsearch-data
ports:
- 9200:9200
- 9300:9300
- 9200
- 9300
volumes:
- elastic-data
labels:
#io.rancher.sidekicks: elasticsearch-data
io.rancher.scheduler.global: true
volumes:
postgres-data:
image: busybox
labels:
io.rancher.container.start_once: true
volumes:
- /var/lib/postgresql/data/pgdata
molgenis-data:
image: busybox
labels:
io.rancher.container.start_once: true
volumes:
- /opt/molgenis
elastic-data:
driver: local
# elasticsearch-data:
# image: busybox
# labels:
# io.rancher.container.start_once: true
# volumes:
# - /usr/share/elasticsearch/data

View File

@ -12,10 +12,40 @@
type: "string"
- variable: "TRAEFIK_BACKEND"
description: "Name of the server when added to loadbalancer"
label: "Backend:"
label: "Traefik backend:"
required: true
default: "test.molgenis.org"
type: "string"
- variable: "DB_SCHEME"
description: "Name of the database scheme"
label: "Database scheme:"
required: true
default: "molgenis"
type: "string"
- variable: "DB_USERNAME"
description: "Name of the database username"
label: "Database username:"
required: true
default: "molgenis"
type: "string"
- variable: "DB_PASSWORD"
description: "Password of the database user"
label: "Database password:"
required: true
default: "molgenis"
type: "string"
- variable: "MOLGENIS_ADMIN_PASSWORD"
description: "Passowrd the MOLGENIS admin"
label: "MOLGENIS admin user password:"
required: true
default: "admin"
type: "string"
- variable: "ELASTIC_CLUSTER"
description: "Name of the elasticsearch cluster"
label: "Cluster:"
required: true
default: "molgenis"
type: "string"
start_on_create: true
scale: 1