ccs-amsterdam / amcat4docker Goto Github PK
View Code? Open in Web Editor NEWDocker repository for the Amsterdam Content Analysis Toolkit (AmCAT). Learn more at https://amcat.nl/
Home Page: https://hub.docker.com/u/ccsamsterdam
Docker repository for the Amsterdam Content Analysis Toolkit (AmCAT). Learn more at https://amcat.nl/
Home Page: https://hub.docker.com/u/ccsamsterdam
I'm collecting ideas what options should be exposed through docker-compose. Currently, one can set:
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
All options for elastic work (since we're using their image), but I assume maybe some should be set by default for amcat users?
Amcat4 documentation suggests using elastic8, but the docker compose files here still use elastic7.
This also makes the "volumes" parameter confusing, because the directory mapping differs between the versions (see: https://stackoverflow.com/questions/65668188/elastic-search-accessdeniedexception-usr-share-elasticsearch-data-nodes-0-a)
elastic8:
- /path/to/elastic-data:/usr/share/elasticsearch/data # [local path]:[container path]
elastic7:
- /path/to/elastic-data:/var/lib/elasticsearch/data # [local path]:[container path]
Related to #2, I've been wondering what the best approach would be to back up, make persistent through updates and migrate the elastic data.
Docker claims that "Volumes are the preferred mechanism for persisting data generated by and used by Docker containers. While bind mounts are dependent on the directory structure and OS of the host machine, volumes are completely managed by Docker" (source)
This sounds good, but this answer notes that volumes are only accessible through containers, which does not seem ideal for the backing up and migrating part. In most scenarios it would be possible to create a container and then use it to docker cp $CONTAINER$:path/to/elastic elastic_backup
. The only exception is if docker itself is broken on a system. But then it would be okay to access the location /var/lib/docker/volumes/<volume-name>
anyway.
When the Elasticsearch container is restarted, amcat4 will throw ConnectionRefusedError: [Errno 111] Connection refused
and Exception: Cannot connect to elasticsearch server ('elastic7:9200',)
errors until the amcat4 container is restarted as well.
We probably should have an automated way to resolve this, since it can be confusing.
I found the line sudo chown -R 1000:1000 ~/.elasticsearch/database
in a SO answer. It solves the problem that the elastic docker container can't access the linked volume on the host machine. However, I'm not sure yet what the implications of this are (especially from a security point of view). A few observations/thoughts:
amcat4_client, amcat4_elastic_host, amcat4_host, amcat4_server_name and possibly the volumes and networks should be anchors instead of being set on several containers. This would make the yaml file easier to read and configuration less error prone.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.