Skip to content

OpenSILEX/opensilex-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimalist opensilex docker compose environment

Important

To report bugs or suggesting enhancements, you can create a tempalted issue. For more information, CONTRIBUTING GUIDE

Pre-requesite softwares

Tested Operating system :

Ubuntu24.04

Debian12

Not working operating system :

Windows

First you need to have these software installed, you can check if they are installed :

Check your installed softwares

Following commands should work from everywhere in your system without errors:

git --version

docker --version

docker compose version

Stack software name with associated versions

  • Mandatory softwares :

    • RDF4J - 5.1.3
    • MongoDB - 8.0.11
    • OpenSILEX - 1.4.9
  • Other managements softwares :

    • mongo-express (A web based gui for mongo) - 1.0.2-20
    • haproxy (web server used as reverse proxy) - 3.2

Contributing to the project

If you want to contibute to the project by declaring a bug or submit a new fonctionnality, see CONTRIBUTING.md file.

Installation steps

This docker version is related to 1.4.9 OpenSILEX version

Fresh new install

Clone the repository to in order to get the project.

git clone --branch 1.4.9 https://forgemia.inra.fr/OpenSILEX/opensilex-docker-compose
cd opensilex-docker-compose

Important

For migration steps from previous versions, take a look to the Migration steps from previous version section

Run minimal opensilex docker stack compose

  • With a bash terminal go to the project directory (where this readme is located).
  • You must run docker compose up command to start your installation:
docker compose --env-file opensilex.env build --build-arg UID=$(id -u) --build-arg GID=$(id -g)
docker compose --env-file opensilex.env up start_opensilex_stack -d
  • Expected Output:
WARN[0000] The "OPENSILEX_START_CMD_DEBUG" variable is not set. Defaulting to a blank string. 
WARN[0000] The "OPENSILEX_START_CMD_DEBUG" variable is not set. Defaulting to a blank string. 
[+] Running 4/10
 ⠸ Network opensilex-stack_default                    Created                                                                       2.3s 
 ⠸ Volume "opensilex-stack_persist_rdf4j_logs"        Created                                                                       2.2s 
 ⠸ Volume "opensilex-stack_persist_opensilex"         Created                                                                       2.2s 
 ⠸ Volume "opensilex-stack_haproxy_conf"              Created                                                                       2.2s 
 ⠹ Volume "opensilex-stack_persist_mongo_data"        Created                                                                       2.2s 
 ⠹ Volume "opensilex-stack_persist_rdf4j_data"        Created                                                                       2.2s 
 ✔ Container opensilex-docker-mongodb                 Started                                                                       1.0s 
 ✔ Container opensilex-docker-rdf4j                   Started                                                                       1.0s 
 ✔ Container opensilex-docker-opensilexapp            Started                                                                       1.5s 
 ✔ Container opensilex-stack-start_opensilex_stack-1  Started  
  • Check if opensilex is launched:
docker logs -f opensilex-docker-opensilexapp 
  • Expected Output:

These lines must be written in the docker logs.

INFO: No Spring WebApplicationInitializer types detected on classpath
Feb 26, 2024 10:00:06 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8081"]

(First install only) Create an administrator user

Docker volumes are persistent until you remove them. You only need to create once an user.

docker exec -it opensilex-docker-opensilexapp ./bin/opensilex.sh user add --admin [email protected] --lang=fr --firstName=firstName --lastName=lastName --password=admin

After opensilex start you will be able to access to the application on port localhost:28081/sandbox/app.

By default, different available services can be found at these adresses :

PS: At the first connection, you will need to change rdf4j server port to 8080 (internal docker port) in order to access to rdf4j repositories.

Expected configuration :

rdf4j_first_connection

Update opensilex version

Warning ! Before updating, if you already have a running version, please check the migration guides between releases. You can find the migration instructions in the changelog for each release (https://github.com/OpenSILEX/opensilex/tree/master/opensilex-doc/src/main/resources/release).

You can do it in two steps :

  • By modifying opensilex.env file with this following configuration you will be able to change.
# Choose opensilex version.
# VERSIONS 
OPENSILEX_RELEASE_TAG=1.2.0
# Ex: OPENSILEX_RELEASE_TAG=1.2.1-rdg or OPENSILEX_RELEASE_TAG=1.2.1
  • You will be able to restart opensilex container only by running the following command.
# construct opensilex docker container
docker compose --env-file opensilex.env build --build-arg UID=$(id -u) --build-arg GID=$(id -g) opensilex
# restart opensilex service
docker compose --env-file=opensilex.env up --force-recreate --no-Ctrl
+
K
20+
Squads
Public Squads

    joindevops's logoDevOps
    devtools's logoDev Tools
    lpython's logoLearn Python
    nuxtandvue's logoVuejs&Nuxtjs

    Discover

Contribute
Manage
Bookmarks
History

Docs
Changelog

    Feedback

meghdev's profile
devtools's profile
Dev Tools
Megh•
Jul 07
Pattern Craft: Beautiful backgrounds for your next big thing
Post Cover image
community's profile
facebook/relay: Relay is a JavaScript framework for building data-driven React applications.
#javascript
#react
+2 tags
Jul 02
•2m read time
Post Cover image
Review requests, book clients, and get paid with Squarespace.
Ad imageAd image background
Promoted by Carbon
antonz's profile
JSON evolution in Go: from v1 to v2
#performance
+2 tags
Jun 22
•11m read time
Post Cover image
awego's profile
Best Programming Language for 2026
#javascript
#python
+3 tags
Jun 26
•5m read time
Post Cover image
duckdb's profile
DuckLake 0.2
#database
#sql
+3 tags
Jul 04
•6m read time
Post Cover image
chiefbrob's profile
phpdev's profile
PHP Dev
Brian Obare•
Jun 30
Laravel & PHP Top this week
Post Cover image
simon125q's profile
linuxcom's profile
Linux Community
Szymon Omieciński•
Jun 28

Omarchy is out
Shared Post Cover image
jobayerhossen's profile
randomresource's profile
Random Resource 🧰
Jobayer Hossen•
Jul 09

Design with AI
Shared Post Cover image
fabidick22's profile
platformai's profile
Platform & AI
Dickson A.•
Jun 30

siyuan-note/siyuan: A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang.
Shared Post Cover image
mouad_dadda's profile
webcraft's profile
WebCraft
Mouad Dadda•
Jun 28
prompts.chat
Post Cover image
amityadav's profile
vibecode's profile
Vibe Code
Amit yadav•
Jun 30

The #1 Open-Source CRM
Shared Post Cover image
smitbhalodiya's profile
alllaravel's profile
All Laravel
Smit Bhalodiya•
Jul 03

Laravel Shortcuts: 5 Simple Functions to Speed Up Your Coding Workflow
Shared Post Cover image
ln's profile
The Pipe Operator is Coming to PHP 8.5
#php
+1 tags
Jul 07
•2m read time
Post Cover image
audreydev's profile
audreyddev's profile
AudreyD.Dev
Audrey Delgado•
May 11

How to Turn GitHub Projects Into Real Money
Shared Post Cover image
astro_source's profile
Astro 5.10
#cloudflare
#astro
Jun 19
•7m read time
Post Cover image
tds's profile
Building A Modern Dashboard with Python and Taipy
#python
+2 tags
Jun 23
•13m read time
Post Cover image
ashikurrahman65's profile
laraveldev's profile
Laravel Dev
Ashikur Rahman•
May 12

How to Improve Performance of Your Database?
Shared Post Cover image
deps opensilex -d

Stop opensilex docker

This command will stop the stack.

docker stop opensilex-docker-opensilexapp

Restart opensilex docker

This command will restart the opensilex service.

docker compose --env-file=opensilex.env up --force-recreate --no-deps opensilex -d

Stop docker stack

This command will stop the docker stack.

docker compose --env-file opensilex.env down

Migration steps from previous versions

First, go to the previous directory and get the actual version of the repository.

# Go inside opensilex-docker-compose directory and get the latest tag
git checkout $(git tag | sort -V | tail -1)

See migration Migration versions

Manage data

File system management are not shown in the the following steps because local files are manage with bind volumes or with gridfs. Other file systems are not managed in this version of opensilex docker.

Export data

This script will dumps mongodb and rdf4j data in a directory with this structure.

# Step 1
cd <opensilex-docker-compose-dir>/dump_scripts
# Example directory structure <opensilex-docker-compose-dir>/dump_scripts/dump_example_structure
# ├── mongodb
# │   └── opensilex-docker-db-2022-11-21
# └── rdf4j
#     └── opensilex-docker-db-2022-11-21
sh export_data.sh <path_to_data>

Import data

This script will restore mongodb and rdf4j data in a directory with this structure.

# Step 1
cd <opensilex-docker-compose-dir>/dump_scripts
# Example directory structure <opensilex-docker-compose-dir>/dump_scripts/dump_example_structure
# ├── mongodb
# │   └── opensilex-dump-db-2022-11-21
# └── rdf4j
#     └── opensilex-dump-db-2022-11-21
sh import_data.sh <path_to_data>

Advanced opensilex docker stack compose configuration

Other tools or customizations

(Optional) Add a gui for opensilex-docker-mongodb

This will start the mongo express server that helps you do explore your mongo data on port localhost:28889/mongoexpress. You can also use your own robo3t or Mongo Compass App.

Before run mongoexpress, please configure admin and password of mongo-express.

ME_CONFIG_BASICAUTH_USERNAME=  
ME_CONFIG_BASICAUTH_PASSWORD=  
#default
#ME_CONFIG_BASICAUTH_USERNAME=adminexpress
#ME_CONFIG_BASICAUTH_PASSWORD=admin
docker compose --env-file opensilex.env up --no-recreate   start_opensilex_stack_mongogui -d

mongo-express-image

(Optional) Add a reverse proxy

This will start the haproxy as reverse proxy for opensilex instance on port that you want to expose.

It can be configure in the ./opensilex.env with the variable HAPROXY_EXPOSED_PORT (Default to port 80 equivalent to http://localhost.

docker compose --env-file opensilex.env up --no-recreate start_opensilex_stack_proxy -d

If you have installed optional reverse proxy

By default, different available services can be found at these adresses. The port might be change depending on your ./opensilex.env configuration file.

Mongo express will be automatically installed (Optional) Add a gui for opensilex-docker-mongodb

Configure docker configuration

Configure opensilex.env file to configure opensilex sparql config, applications ports, applications volumes

# CAN BE MODIFIED BY USER

## START COMMAND can had debug option by uncommenting the following statment
# OPENSILEX_START_CMD_DEBUG=--DEBUG

# SPARQL
BASEURI=http://opensilex.test/
BASEURIALIAS=opensilex-sandbox
# customize path prefix Ex : localhost:28081/sandbox or localhost:8081/phenotyping_si
OPENSILEX_PATH_PREFIX=sandbox
VERSION_LABEL=test-version
OPENSILEX_PUBLIC_URL=http://localhost:28081/ # public url for web api

# FILE SYSTEM
# Default value is "gridfs" - Only "gridfs" or "local" are supported
OPENSILEX_FILESYSTEM=gridfs
DATAFILE_OPENSILEX_FILESYSTEM=gridfs
DOCUMENTS_OPENSILEX_FILESYSTEM=gridfs   
# If "local" file system is choosed OPENSILEX_LOCAL_FILE_SYSTEM_DIRECTORY is mandatory if you choose gridfs local will be not used
# File system configuration can be customized to opensilex-template.yml
OPENSILEX_LOCAL_FILE_SYSTEM_DIRECTORY=./opensilex_data
#Ex :
#OPENSILEX_LOCAL_FILE_SYSTEM_DIRECTORY=/home/charlero/GIT/GITLAB/opensilex-docker-compose/dump_scripts/demo_dump/publictest

# PORTS
HAPROXY_EXPOSED_PORT=8087
OPENSILEX_EXPOSED_PORT=28081
RDF4J_EXPOSED_PORT=28887
MONGO_EXPOSED_PORT=28888
MONGO_EXPRESS_EXPOSED_PORT=28889

## START COMMAND can had debug option : --DEBUG
OPENSILEX_START_CMD=./bin/opensilex.sh server start --host=localhost --port=8081 --adminPort=4081 --CONFIG_FILE=/home/opensilex/config/opensilex.yml

# VERSIONS
HAPROXY_IMAGE_VERSION=2.6.6
OPENSILEX_RELEASE_TAG=1.2.1
RDF4J_IMAGE_VERSION=3.7.7
MONGO_IMAGE_VERSION=5.0.19
MONGO_EXPRESS_IMAGE_VERSION=1.0.0-alpha.4
 
# # THEME
OPENSILEX_CONFIG_THEME=opensilex-front#opensilex
OPENSILEX_CONFIG_HOMECOMPONENT=opensilex-HomeView
OPENSILEX_CONFIG_LOGINCOMPONENT=opensilex-DefaultLoginComponent
OPENSILEX_CONFIG_FOOTERCOMPONENT=opensilex-DefaultFooterComponent
OPENSILEX_CONFIG_MENUCOMPONENT=opensilex-DefaultMenuComponent
OPENSILEX_CONFIG_HEADERCOMPONENT=opensilex-DefaultHeaderComponent

# Example of modification for sixtine
#OPENSILEX_CONFIG_THEME=inrae-sixtine-vigne#vigne
#OPENSILEX_CONFIG_HOMECOMPONENT=inrae-sixtine-vigne-SixtineHomeComponent
#OPENSILEX_CONFIG_LOGINCOMPONENT=inrae-sixtine-vigne-SixtineLoginComponent
#OPENSILEX_CONFIG_FOOTERCOMPONENT=inrae-sixtine-vigne-SixtineFooterComponent
#OPENSILEX_CONFIG_MENUCOMPONENT=inrae-sixtine-vigne-SixtineMenuComponent
#OPENSILEX_CONFIG_HEADERCOMPONENT=inrae-sixtine-vigne-SixtineHeaderComponent

Customize opensilex configuration

Configure config/opensilex-custom-config.yml file to activate custom features.

Example : Activate and calculated metrics each 2 hours.

# ------------------------------------------------------------------------------
# Configuration for module: CoreModule (CoreConfig)
core:
  # Metrics options (MetricsConfig)
  metrics:
    # Activate access metrics (boolean)
    enableMetrics: true
    # Metrics configs about system (SystemMetricsConfig)
    system:
      # First metrics for any time depending on is time unit (int)
      timeBeforeFirstMetric: 1
      # Delay between whole system metrics (combined with corresponding TimeUnit) (int)
      delayBetweenMetrics: 2
      # Default metrics units : DAYS, HOURS, MINUTES, SECONDS are authorized (String)
      metricsTimeUnit: HOURS
    # Metrics configs about experiments (ExperimentsMetricsConfig)
    experiments:
      # First metrics for any time depending on is time unit (int)
      timeBeforeFirstMetric: 1
      # Delay between whole system metrics (combined with corresponding TimeUnit) (int)
      delayBetweenMetrics: 2
      # Default metrics units : DAYS, HOURS, MINUTES, SECONDS are authorized (String)
      metricsTimeUnit: HOURS

Core module extensions

Other modules can be activated by modifiyng OPENSILEX_RELEASE_TAG version (Example : RDG module).

Configuration for RDG module

By modifying opensilex.env file with this following configuration you will be able to activate rdg module. For more configuration, see RDG module configuration.

# Example of modification for RDG module
# VERSIONS
HAPROXY_IMAGE_VERSION=2.6.6
OPENSILEX_RELEASE_TAG=1.2.1-rdg
RDF4J_IMAGE_VERSION=3.7.7
MONGO_IMAGE_VERSION=5.0.19
MONGO_EXPRESS_IMAGE_VERSION=1.0.0-alpha.4

Modular extensions

Explanation of modules directory

Module (opensilex jar) can be added to "modules" directory (opensilex-docker-compose/modules) in order to be deployed in opensilex stack.

There is a module example directory working with "inrae-sixtine-vigne" module (inrae-sixtine-vigne-1.1.0.jar) that allow you to change ontology and instance front style. It is localised in opensilex-docker-compose/modules_examples/1.0.0-rc+6.5/inrae-sixtine-vigne-1.1.0.jar.

How to do it ?

  • To activate your module you must copy a module example that have been compiled for a specified opensilex version in modules directory. (Ex : the module located in 1.0.0-rc+6.5/inrae-sixtine-vigne-1.1.0.jar has been compiled for opensilex version 1.0.0-rc+6.5). It's all.

Configuration for PHIS module

By modifying opensilex.env file with this following configuration you will be able to change the theme.

OPENSILEX_CONFIG_APPLICATIONNAME=Phis
OPENSILEX_CONFIG_THEME=opensilex-phis#phis
OPENSILEX_CONFIG_HOMECOMPONENT=opensilex-HomeView
OPENSILEX_CONFIG_LOGINCOMPONENT=opensilex-phis-PhisLoginComponent
OPENSILEX_CONFIG_HEADERCOMPONENT=opensilex-phis-PhisHeaderComponent
OPENSILEX_CONFIG_FOOTERCOMPONENT=opensilex-DefaultFooterComponent
OPENSILEX_CONFIG_MENUCOMPONENT=opensilex-DefaultMenuComponent

Configuration for inrae sixtine vigne

By modifying opensilex.env file with this following configuration you will be able to change the theme.

# Example of modification for sixtine vigne module
OPENSILEX_CONFIG_THEME=inrae-sixtine-vigne#vigne
OPENSILEX_CONFIG_HOMECOMPONENT=inrae-sixtine-vigne-SixtineHomeComponent
OPENSILEX_CONFIG_LOGINCOMPONENT=inrae-sixtine-vigne-SixtineLoginComponent
OPENSILEX_CONFIG_FOOTERCOMPONENT=inrae-sixtine-vigne-SixtineFooterComponent
OPENSILEX_CONFIG_MENUCOMPONENT=inrae-sixtine-vigne-SixtineMenuComponent
OPENSILEX_CONFIG_HEADERCOMPONENT=inrae-sixtine-vigne-SixtineHeaderComponent

Manage docker

In order to manage your docker stack via an web interface, we suggest you to use Portainer Community edition edition

portainer-image

Debug installation

This command will give you stack trace of the docker build.

docker compose --env-file opensilex.env build --build-arg UID=$(id -u) --build-arg GID=$(id -g) > docker_logs/debug.log

Danger Zone

Caution

The following commands may produce a loss of data.

$\color{red}{The\ following\ commands\ may\ produce\ a\ loss\ of\ data}$

Stop docker stack and erase all data (Be sure to delete all data)

This command will stop docker stack and erase all data in your databases.

docker compose --env-file opensilex.env down --volumes
# this command will erase all the data

Acknowledgments

This Docker compose environnent to deploy opensilex stack based on a previous work opensilex-phis-igepp.

Olivier Fangi & Co - P2M2 Team

About

This project aims to create a opensilex instance running on docker-compose stack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages