Add rsyslog config to container from file for consistency

This commit is contained in:
Christian Adams
2020-04-08 00:50:20 -04:00
parent 470159b4d7
commit 2329c1b797
6 changed files with 14 additions and 13 deletions

View File

@@ -123,7 +123,7 @@ ADD tools/docker-compose/entrypoint.sh /
ADD tools/scripts/awx-python /usr/bin/awx-python
# Pre-create things that we need to write to
RUN for dir in /var/lib/awx/rsyslog /var/run/rsyslog /var/log/tower/ /var/lib/awx/projects /.ansible /var/log/nginx /var/lib/nginx /.local; \
RUN for dir in /var/lib/awx /var/lib/awx/rsyslog /var/run/rsyslog /var/log/tower/ /var/lib/awx/projects /.ansible /var/log/nginx /var/lib/nginx /.local; \
do mkdir -p $dir; chmod -R g+rwx $dir; chgrp -R root $dir; done && \
\
for file in /etc/passwd /etc/supervisord.conf /venv/awx/lib/python3.6/site-packages/awx.egg-link /var/run/nginx.pid; \
@@ -133,7 +133,7 @@ RUN for dir in /var/lib/awx/rsyslog /var/run/rsyslog /var/log/tower/ /var/lib/aw
RUN chmod -R 0775 /var/lib/awx /var/lib/awx/rsyslog
ADD tools/docker-compose/rsyslog.repo /etc/yum.repos.d/
RUN yum install -y rsyslog-omhttp
RUN echo -e '$WorkDirectory /var/lib/awx/rsyslog\n$IncludeConfig /etc/rsyslog.d/*.conf' >> /var/lib/awx/rsyslog/rsyslog.conf
ADD tools/docker-compose/rsyslog.conf /var/lib/awx/rsyslog/rsyslog.conf
RUN chmod 0775 /var/lib/awx/rsyslog/rsyslog.conf
ENV HOME /var/lib/awx

View File

@@ -0,0 +1,4 @@
$WorkDirectory /var/lib/awx/rsyslog
$IncludeConfig /etc/rsyslog.d/*.conf
*.* stop
action(type="omfwd" target="localhost" port="9000" protocol="udp")