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-elkELK Stack that povides the datacranach-apiNode JS application that provides the API
Build the images and run the containers
docker compose buildRun the containers
docker compose up -dFor debugging run the containers without detached mode
docker compose upStop the containers
docker compose stopTo 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.deNavigate 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 -dStop the containers
docker compose stopThere 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-masterbranchesmivs.03.gm.fh-koeln.de-integrationbranches
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
filesdirectory
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
filesfolder. - Make a copy of the file
example-config.cfgand rename it toconfig.cfg. - Now adjust the variable
elasticsearch_indices_import_filesin 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