Installation & Configuration
Before starting the deployment of our digital lab book, please make sure to read atleast this guide once to get an overview of the deployment process.
Prerequisites
Deployment of our digital lab book can be done via docker containers. The system(s) dedicated to running the platform should have Docker and Docker Compose installed. You can find the installation instructions for Docker and Docker Compose on the official Docker website.
To use all functionalities of the platform, you should also have a SMTP (email) server available. This is used to send out E-Mails for account verification and password reset.
Running the containers
We provide a docker-compose.yml
file to run the platform in a containerized environment. You can find the file in the docker
directory of the project. The file contains all necessary services to run the platform.
For example you might want to create a new directory and download the docker-compose.yml
file into it and than start it as follows:
mkdir snip
wget https://gitlab.gwdg.de/irp/snip/-/raw/main/docker/docker-compose.yml
docker-compose up
Configuration
Configuration files are automatically generated on startup into the ./config
folder. You may change the mount in the docker-compose.yml
file to a different location if you want to store the configuration files in a different location.
Even though snip should come with reasonable defaults and randomly generated
secrets, please check the configuration files in the ./config
directory.
Environment Variables
Even thought most configuration options come in yaml format, there are some optional configuration options that need to need to be set via environment variables. You can set them in a .env
file in the same directory as the docker-compose.yml
file. The .env
file is automatically loaded by Docker Compose.
Hostname and Port
As the services dont know on which port they are exposed to the internet and on which
hostname they are running, you need to set the SNIP_HOSTNAME
and SNIP_PORT
environment variables. This is mainly used to generate the correct URLs for
single sign on providers and for the email verification links. If you are currently just testing the platform, you can omit them.
For example using a .env
file:
SNIP_HOSTNAME=snip.example.com
SNIP_PORT=443
Timezone
The timezone defaults to Europe/Berlin
. You can change this by setting the TZ
environment variable for all services in the docker-compose.yml
file.
E.g. using a .env
file:
TZ=America/New_York
Complete example .env
file
SNIP_HOSTNAME=snip.example.com
SNIP_PORT=443
TZ=Europe/Berlin
SSL
By default we supply a self signed certificate for development and testing purposes. For production use, you should mount your certificates (certificate.crt
and certificate.key
)
in the /ssl
directory of the nginx container.
This should be done in the docker-compose.yml
file like this:
services:
nginx:
container_name: snip_nginx
image: docker.gitlab.gwdg.de/irp/snip/nginx:latest
ports:
- 443:443
depends_on:
- next
- images
volumes:
- ./my_ssl_dir:/ssl
# ...other config