kitodo / kitodo-publication

Kitodo.Publication
GNU General Public License v3.0
13 stars 13 forks source link

Workspace ap4 #166

Closed haogatyp closed 4 years ago

haogatyp commented 4 years ago

Contains the tickets CMR-703, CMR-685 and CMR-694.

claussni commented 4 years ago

Docker Compose fails when building the images:

Step 6/11 : FROM typo3builder
 ---> 46d694515740
Step 7/11 : WORKDIR /var/www/html
 ---> Running in 6c20332587b1
Removing intermediate container 6c20332587b1
 ---> 11e64d435183
Step 8/11 : RUN composer config repositories.kitodo-publication '{"type": "path", "url": "/app", "options": {"symlink": true}}' &&     composer config minimum-stability dev &&     composer config prefer-stable true
 ---> Running in 8f1f25d5cb9d
Removing intermediate container 8f1f25d5cb9d
 ---> 582a38a8ba0e
Step 9/11 : RUN composer require devlog/devlog:~3.0.4 &&     composer require kitodo/presentation
 ---> Running in 49575b2e1164

  [RuntimeException]                                                
  The `url` supplied for the path (/app) repository does not exist  

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

ERROR: Service 'typo3' failed to build: The command '/bin/sh -c composer require devlog/devlog:~3.0.4 &&     composer require kitodo/presentation' returned a non-zero code: 1

This seems to be the problem: #167

Fix

diff --git a/Build/Dockerfile-TYPO3 b/Build/Dockerfile-TYPO3
index 6a257a11..64fcbbe4 100644
--- a/Build/Dockerfile-TYPO3
+++ b/Build/Dockerfile-TYPO3
@@ -51,9 +51,9 @@ WORKDIR /var/www/html
 RUN composer config repositories.kitodo-publication '{"type": "path", "url": "/app", "options": {"symlink": true}}' && \
     composer config minimum-stability dev && \
     composer config prefer-stable true
+COPY . /app
 RUN composer require devlog/devlog:~3.0.4 && \
     composer require kitodo/presentation
-COPY . /app
 RUN composer require nimut/testing-framework && \
     composer require kitodo/publication:@dev && \
     chown -R www-data .
claussni commented 4 years ago

Elasticsearch container is not started after docker-compose up. Errors from the containe log output:

{"type": "server", "timestamp": "2020-05-15T06:09:39,225Z", "level": "INFO", "component": "o.e.b.BootstrapChecks", "cluster.name": "es-docker-cluster", "node.name": "elasticsearch-kitodo-75", "message": "bound or publishing to a non-loopback address, enforcing bootstrap checks" }
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
haogatyp commented 4 years ago

vm.max_map_count

I assume this can only be configured in the host and not inside a docker container.

claussni commented 4 years ago

Elasticsearch has Docker prerequisites: https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-prod-prerequisites

claussni commented 4 years ago

In principle docker allows to set Kernel parameters on container start. This is limited to certain namespaces. The parameter in question here (vm.max_map_count) is not in this namespaces because it is a host parameter.

claussni commented 4 years ago

I thought there is no Backend Module for Kitodo.Publication anymore. Why this: Screenshot from 2020-05-18 11-16-22?

haogatyp commented 4 years ago

I thought there is no Backend Module for Kitodo.Publication anymore. Why this: Screenshot from 2020-05-18 11-16-22?

The backend module no longer exists, thats right, but there was still a definition for the entry in the backend module column. This has now been removed and should not appear anymore.