[Compose] New images with LOG_LINES
[Update] Do not add empty line in each loop
This commit is contained in:
@@ -12,7 +12,7 @@ log_f() {
|
||||
fi
|
||||
redis-cli -h redis LPUSH ACME_LOG "{\"time\":\"$(date +%s)\",\"message\":\"$(printf '%s' "${1}" | \
|
||||
tr '%&;$"_[]{}-\r\n' ' ')\"}" > /dev/null
|
||||
redis-cli -h redis LTRIM ACME_LOG 0 9999 > /dev/null
|
||||
redis-cli -h redis LTRIM ACME_LOG 0 ${LOG_LINES} > /dev/null
|
||||
}
|
||||
|
||||
if [[ "${SKIP_LETS_ENCRYPT}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
|
||||
|
@@ -6,7 +6,7 @@ ENV LC_ALL C
|
||||
ENV DOVECOT_VERSION 2.2.33.2
|
||||
ENV PIGEONHOLE_VERSION 0.4.21
|
||||
|
||||
RUN apt-get update && apt-get -y install \
|
||||
RUN apt-get update && apt-get -y --no-install-recommends install \
|
||||
automake \
|
||||
autotools-dev \
|
||||
build-essential \
|
||||
@@ -56,6 +56,7 @@ RUN apt-get update && apt-get -y install \
|
||||
make \
|
||||
procps \
|
||||
supervisor \
|
||||
cron \
|
||||
syslog-ng \
|
||||
syslog-ng-core \
|
||||
syslog-ng-mod-redis \
|
||||
|
@@ -35,7 +35,7 @@ destination d_redis_cleanup {
|
||||
host("redis-mailcow")
|
||||
persist-name("redis3")
|
||||
port(6379)
|
||||
command("LTRIM" "DOVECOT_MAILLOG" "0" "9999")
|
||||
command("LTRIM" "DOVECOT_MAILLOG" "0" "`LOG_LINES`")
|
||||
);
|
||||
};
|
||||
filter f_mail { facility(mail); };
|
||||
|
@@ -35,7 +35,7 @@ destination d_redis_cleanup {
|
||||
host("redis-mailcow")
|
||||
persist-name("redis3")
|
||||
port(6379)
|
||||
command("LTRIM" "POSTFIX_MAILLOG" "0" "9999")
|
||||
command("LTRIM" "POSTFIX_MAILLOG" "0" "`LOG_LINES`")
|
||||
);
|
||||
};
|
||||
filter f_mail { facility(mail); };
|
||||
|
@@ -38,7 +38,7 @@ destination d_redis_cleanup {
|
||||
host("redis-mailcow")
|
||||
persist-name("redis3")
|
||||
port(6379)
|
||||
command("LTRIM" "SOGO_LOG" "0" "9999")
|
||||
command("LTRIM" "SOGO_LOG" "0" "`LOG_LINES`")
|
||||
);
|
||||
};
|
||||
log {
|
||||
|
@@ -37,7 +37,7 @@ log_msg() {
|
||||
redis-cli -h redis LPUSH WATCHDOG_LOG "{\"time\":\"$(date +%s)\",\"message\":\"$(printf '%s' "${1}" | \
|
||||
tr '%&;$"_[]{}-\r\n' ' ')\"}" > /dev/null
|
||||
fi
|
||||
redis-cli -h redis LTRIM WATCHDOG_LOG 0 9999 > /dev/null
|
||||
redis-cli -h redis LTRIM WATCHDOG_LOG 0 ${LOG_LINES} > /dev/null
|
||||
echo $(date) $(printf '%s\n' "${1}")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user