Apache Nutch is an extensible and scalable web crawler
NUTCH-2883 Provide means to run server and webapp as persistent services in Docker container - install Nutch WebApp from separate repository (see NUTCH-2886) and run it via `mvn jetty:run -Djetty.port=<WEBAPP_PORT> - sync log paths in supervisord config files
Sebastian Nagel7c1a48cfad86
diff --git a/docker/Dockerfile b/docker/Dockerfileindex d58b583e6..cffa00a95 100644--- a/docker/Dockerfile+++ b/docker/Dockerfile@@ -94,6 +94,12 @@ ENV SERVER_PORT=$SERVER_PORTENV SERVER_HOST=$SERVER_HOSTENV WEBAPP_PORT=$WEBAPP_PORT+# Install the webapp+RUN apk --no-cache add maven+RUN git clone https://github.com/apache/nutch-webapp.git nutch_webapp && \+ cd nutch_webapp && \+ mvn package+# Arrange necessary setup for supervisordRUN mkdir -p /var/log/supervisordCOPY ./config/supervisord_startserver_webapp.conf /etc/supervisord.confdiff --git a/docker/config/supervisord_startserver.conf b/docker/config/supervisord_startserver.confindex f9b87b093..18ecc948d 100644--- a/docker/config/supervisord_startserver.conf+++ b/docker/config/supervisord_startserver.conf@@ -15,7 +15,7 @@[supervisord]childlogdir=/var/log/supervisord/-logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)+logfile=/var/log/supervisord/supervisord.log ; (main log file;default $CWD/supervisord.log)logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)logfile_backups=10 ; (num of main logfile rotation backups;default 10)loglevel=info ; (log level;default info; others: debug,warn,trace)@@ -44,4 +44,4 @@ stdout_logfile=/var/log/supervisord/%(program_name)s_stdout.logstdout_logfile_backups=5stdout_logfile_maxbytes=10MB#stdout_syslog=-user=root\ No newline at end of file+user=rootdiff --git a/docker/config/supervisord_startserver_webapp.conf b/docker/config/supervisord_startserver_webapp.confindex 1b41f1cf1..25f653cda 100644--- a/docker/config/supervisord_startserver_webapp.conf+++ b/docker/config/supervisord_startserver_webapp.conf@@ -49,7 +49,8 @@ user=root[program:nutchwebapp]autorestart=trueautostart=true-command=nutch webapp -port %(ENV_WEBAPP_PORT)s+directory=/root/nutch_webapp+command=mvn jetty:run -Djetty.port=%(ENV_WEBAPP_PORT)senvironment=PATH=/usr/local/bin:%(ENV_PATH)sprocess_name=%(program_name)snumprocs=1