Docker Setup for Lucas Cranach Archive
Create a copy of the file example-env
and rename it to .env
.
Set up the variables in the .env
File.
The application runs with Docker Compose and contains two Container.
cranach-elk
ELK Stack that povides the datacranach-api
Node JS application that provides the API
Build the images and run the containers
docker-compose build
Run the containers
docker-compose up -d
For debugging run the containers without detached mode
docker-compose up
Stop the containers
docker-compose stop
To start and stop the containers on a remote server, you can use the following commands:
Login to the remote server
ssh -l <username> mivs02.gm.fh-koeln.de
Navigate to the directory where the docker-compose.yml
file is located
cd /var/lucascranach/cranach-docker/
Start the containers
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
Stop the containers
docker-compose stop
There are two remote servers for the Cranach API which can be accessed via the following URLs:
https://mivs.02.gm.fh-koeln.de
- Productive environmenthttps://mivs.03.gm.fh-koeln.de
- Development enviroment
The Deployment to the servers is handled via GitHub Actions and is triggered when changes are pushed to one of the following repositories: cranach-docker
, cranach-api
, cranach-elk
On which server will be deployed depends on the branch to which changes are pushed or a pull request is merged. The following dependencies exist:
mivs.02.gm.fh-koeln.de
-master
branchesmivs.03.gm.fh-koeln.de
-integration
branches
The importer is located in the directory importer
.
- Push the zipped files to be imported on the server
scp files.zip <username>@mivs02.gm.fh-koeln.de:~
- Log in to the server.
ssh -l <username> mivs02.gm.fh-koeln.de
- Move the zip file to the
files
directory
sudo mv files.zip /var/lucascranach/cranach-docker/importer/files/
- unzip and delete
files.zip
sudo cd /var/lucascranach/cranach-docker/importer && unzip files.zip && rm files.zip
- Start the import script
cd /var/lucascranach/cranach-docker/importer && make importesindices
- Put the files to be imported into the
files
folder. - Make a copy of the file
example-config.cfg
and rename it toconfig.cfg
. - Now adjust the variable
elasticsearch_indices_import_files
in the fileconfig.cfg
. - Start the import script:
make importesinidices
- stop reverse proxy container
cd /var/lucascranach/cranach-docker/ && docker-compose stop reverse-proxy
- Renew certificate
sudo certbot certonly --standalone --preferred-challenges http -d mivs02.gm.fh-koeln.de
- start reverse proxy
cd /var/lucascranach/cranach-docker/ && sudo docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d reverse-proxy