-
-
Notifications
You must be signed in to change notification settings - Fork 18
SEPIA inside virtual environments
When running SEPIA-Home inside a Docker container there are a few things you need to take care of to make the system stable and to make data persistent.
The Docker container will inherit certain properties of your host system (the machine running Docker). One of these properties is about virtual memory (mmap counts) and is important for the Elasticsearch database used by SEPIA.
Usually you would set sudo sysctl -w vm.max_map_count=262144 in your Linux system before running Elasticsearch, but this will not work inside Docker. You need to run the command BEFORE starting your container.
On some systems like Windows and Mac you probably need to enter the virtual machine first that runs the Docker engine. Try one of these commands:
- Windows / Docker Toolbox:
docker-machine ssh - Mac (xhyve virtual machine):
screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
Inside this machine enter sudo sysctl -w vm.max_map_count=262144.
Your SEPIA-Home installation needs to have a place to store data persistently. The most comfortable solution is to create an EMPTY(!) Docker volume in advance and add this to your run script. This way the Docker container will itself copy over all necessary data to the empty volume on start. Here is how this works (Linux, may or may not require sudo):
SEPIA_SHARE=/home/[my-user]/sepia-home-share && mkdir -p $SEPIA_SHARE"
docker volume create --opt type=none --opt device=$SEPIA_SHARE --opt o=bind sepia-home-share"`
On Windows you might need to do some additional configuration via the 'shared drives' configuration of the Docker settings. Maybe there is something similar for Mac (not tested yet).
Before you can use your SEPIA-Home server you need to run the setup to create your database and define passwords for the admin and assistant user. Use the following command to run your container with terminal access (replace X.Y.Z with your version):
docker run --rm --name=sepia_home -it -v sepia-home-share:/home/admin/SEPIA sepia/home:vX.Y.Z /bin/bash"
Inside your container terminal type bash setup.sh and complete the setup with steps 4 and 1. After that exit the container.
The default run command for your SEPIA container should make available some port to access the SEPIA server (recommended 20726 but can be anything) and mount your volume (above we called it 'sepia-home-share'):
docker run --rm --name=sepia_home -p 20726:20726 -v sepia-home-share:/home/admin/SEPIA sepia/home:vX.Y.Z"
(may or may not require sudo, depending on your setup)