syslog added
a syslog image will log everything it receives on stdout; so every service that has a hard time logging can just send everything to it. apache/ttrss configured to do it.
This commit is contained in:
parent
0c6feb350a
commit
4b2d2fddce
2 changed files with 14 additions and 4 deletions
|
@ -52,5 +52,9 @@ services:
|
|||
ports:
|
||||
- 80:80
|
||||
|
||||
syslog:
|
||||
image: jumanjiman/rsyslog:latest
|
||||
container_name: feedati_syslog
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
|
|
@ -12,16 +12,22 @@ RUN mkdir -p /app/public/tt-rss/ /var/cache/tt-rss/images \
|
|||
# can't get ttys unless you run the container in privileged mode
|
||||
sed -i '/tty/d' /etc/inittab &&\
|
||||
# can't set hostname since docker sets it
|
||||
sed -i 's/hostname $opts/# hostname $opts/g' /etc/init.d/hostname &&\
|
||||
sed -i '/hostname $opts/d' /etc/init.d/hostname &&\
|
||||
# can't mount tmpfs since not privileged
|
||||
sed -i 's/mount -t tmpfs/# mount -t tmpfs/g' /lib/rc/sh/init.sh &&\
|
||||
sed -i '/mount -t tmpfs/d' /lib/rc/sh/init.sh &&\
|
||||
# can't do cgroups
|
||||
sed -i 's/cgroup_add_service$/# cgroup_add_service /g' /lib/rc/sh/openrc-run.sh
|
||||
sed -i '/cgroup_add_service$/d' /lib/rc/sh/openrc-run.sh &&\
|
||||
sed -i '/^ntpd/d' /bootstrap/start.sh &&\
|
||||
echo -e 'log_errors = On\nerror_log = syslog' >> /etc/php7/php.ini &&\
|
||||
sed -i -r 's@ErrorLog .*@ErrorLog "| logger -n syslog -T -P 514 -t apacheErr"@i' /etc/apache2/httpd.conf &&\
|
||||
echo 'TransferLog "| logger -n syslog -T -P 514 -t apacheLog"' >> /etc/apache2/httpd.conf
|
||||
RUN apk --no-cache add util-linux
|
||||
|
||||
COPY tt-rss/* /app/public/tt-rss/
|
||||
COPY docker/ttrss-openrc-apache /etc/init.d/apache
|
||||
COPY docker/ttrss-openrc-ttrssupdate /etc/init.d/ttrssupdate
|
||||
RUN rc-update add apache && rc-update add ttrssupdate
|
||||
COPY docker/ttrss-openrc-ntpd /etc/init.d/ntpd
|
||||
RUN rc-update add ntpd && rc-update add apache && rc-update add ttrssupdate
|
||||
|
||||
|
||||
ENTRYPOINT []
|
||||
|
|
Loading…
Reference in a new issue