Skip to content

Commit

Permalink
NUTCH-2883 Provide means to run server and webapp as persistent servi…
Browse files Browse the repository at this point in the history
…ces 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
  • Loading branch information
sebastian-nagel committed Aug 21, 2022
1 parent e3afb0c commit 0e86345
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

Breaking Changes

- the plugin parse-swf for parsing Shockwave/Adobe Flash conent was removed (NUTCH-2861)
- the Nutch WebApp was moved to a separate repository (NUTCH-2886)
- see https://github.com/apache/nutch-webapp
https://gitbox.apache.org/repos/asf?p=nutch-webapp.git
- see docker/README.md for an integration of the separate WebApp with Nutch and Nutch server
- the plugin parse-swf for parsing Shockwave/Adobe Flash content was removed (NUTCH-2861)



Expand Down
6 changes: 6 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ ENV SERVER_PORT=$SERVER_PORT
ENV SERVER_HOST=$SERVER_HOST
ENV 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 supervisord
RUN mkdir -p /var/log/supervisord
COPY ./config/supervisord_startserver_webapp.conf /etc/supervisord.conf
Expand Down
4 changes: 2 additions & 2 deletions docker/config/supervisord_startserver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -44,4 +44,4 @@ stdout_logfile=/var/log/supervisord/%(program_name)s_stdout.log
stdout_logfile_backups=5
stdout_logfile_maxbytes=10MB
#stdout_syslog=
user=root
user=root
3 changes: 2 additions & 1 deletion docker/config/supervisord_startserver_webapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ user=root
[program:nutchwebapp]
autorestart=true
autostart=true
command=nutch webapp -port %(ENV_WEBAPP_PORT)s
directory=/root/nutch_webapp
command=mvn jetty:run -Djetty.port=%(ENV_WEBAPP_PORT)s
environment=PATH=/usr/local/bin:%(ENV_PATH)s
process_name=%(program_name)s
numprocs=1
Expand Down

0 comments on commit 0e86345

Please sign in to comment.