Skip to content

Commit

Permalink
Fixed filebeat not starting on container creation [DHDO-64]
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlinssen committed Dec 9, 2021
1 parent df1005c commit 5b674cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ RUN ( yum -y install wget nano \
boost boost-system boost-filesystem \
boost-chrono boost-regex boost-thread \
jansson fuse-libs \
httpd)
httpd initscripts \
ca-certificates )

# create temporary directory
RUN ( mkdir -p /tmp )
Expand Down
5 changes: 4 additions & 1 deletion run-httpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ if [ -f /config/irods_environment.json ]; then
chmod 0644 /etc/httpd/irods/irods_environment.json
fi

# Start filebeat
/etc/init.d/filebeat start

# start the apache daemon
exec /usr/sbin/apachectl -DFOREGROUND

# this script must end with a persistent foreground process
tail -F /var/log/httpd/access.log /var/log/httpd/error.log |awk '/^==> / {a=substr($0, 5, length-8); next} {print a":"$0}'
tail -F /var/log/httpd/access.log /var/log/httpd/error.log |awk '/^==> / {a=substr($0, 5, length-8); next} {print a":"$0}'

0 comments on commit 5b674cb

Please sign in to comment.