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

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

View File

@@ -101,7 +101,7 @@ ADD rsyslog.repo /etc/yum.repos.d/
RUN yum install -y rsyslog-omhttp
# Pre-create things that we need to write to
RUN for dir in /home/awx /var/run/supervisor /var/lib/awx/rsyslog /var/run/rsyslog /var/log/tower /var/log/nginx /var/lib/nginx; \
RUN for dir in /home/awx /var/run/supervisor /var/lib/awx /var/lib/awx/rsyslog /var/run/rsyslog /var/log/tower /var/log/nginx /var/lib/nginx; \
do mkdir -p $dir; chmod -R g+rwx $dir; chgrp -R root $dir; done && \
\
for file in /etc/passwd /var/run/nginx.pid; \
@@ -116,7 +116,7 @@ RUN find /var/lib/awx -not -path '/var/lib/awx/venv*' | xargs chgrp root && \
chmod u+s /usr/bin/bwrap # https://github.com/ansible/awx/issues/5224
# Create default awx rsyslog.conf
RUN echo -e '$WorkDirectory /var/lib/awx/rsyslog\n$IncludeConfig /etc/rsyslog.d/*.conf' >> /var/lib/awx/rsyslog/rsyslog.conf
ADD rsyslog.conf /var/lib/awx/rsyslog/rsyslog.conf
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \

View File

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