@@ -5,44 +5,23 @@ FROM ${BUILD_FROM}
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Setup base system
|
||||
ARG BUILD_ARCH
|
||||
|
||||
# Syslog-ng version
|
||||
ARG SYSLOG_NG_VERSION
|
||||
ARG BUILD_ARCH=amd64
|
||||
|
||||
# Install syslog-ng
|
||||
RUN \
|
||||
echo "**** install packages ****" && \
|
||||
apk add -U --upgrade --no-cache \
|
||||
curl && \
|
||||
if [ -z ${SYSLOG_NG_VERSION+x} ]; then \
|
||||
SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
|
||||
&& awk '/^P:syslog-ng$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
|
||||
fi && \
|
||||
apk add -U --upgrade --no-cache \
|
||||
syslog-ng==${SYSLOG_NG_VERSION} \
|
||||
syslog-ng-add-contextual-data \
|
||||
syslog-ng-amqp \
|
||||
syslog-ng-graphite \
|
||||
syslog-ng-http \
|
||||
syslog-ng-json \
|
||||
syslog-ng-map-value-pairs \
|
||||
syslog-ng-redis \
|
||||
syslog-ng-scl \
|
||||
syslog-ng-sql \
|
||||
syslog-ng-stardate \
|
||||
syslog-ng-stomp \
|
||||
syslog-ng-tags-parser \
|
||||
syslog-ng-xml \
|
||||
py3-syslog-ng && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
apt-get update -qq && \
|
||||
apt-get install -y wget ca-certificates gnupg2 debian-ports-archive-keyring xz-utils dirmngr systemd && \
|
||||
wget -qO - https://ose-repo.syslog-ng.com/apt/syslog-ng-ose-pub.asc | gpg --dearmor > /usr/share/keyrings/ose-repo-archive-keyring.gpg && \
|
||||
echo "deb [ signed-by=/usr/share/keyrings/ose-repo-archive-keyring.gpg ] https://ose-repo.syslog-ng.com/apt/ stable debian-testing" | tee --append /etc/apt/sources.list.d/syslog-ng-ose.list && \
|
||||
apt-get update -qq && \
|
||||
apt-get install -y libdbd-mysql libdbd-pgsql libdbd-sqlite3 syslog-ng && \
|
||||
rm -fr /tmp/* /var/{cache,log}/* /var/lib/apt/lists/*
|
||||
|
||||
# Copy root filesystem
|
||||
COPY rootfs /
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 5514/udp 6601/tcp 6514/tcp
|
||||
EXPOSE 514/udp 601/tcp 6514/tcp
|
||||
|
||||
# Define HealthCheck
|
||||
HEALTHCHECK --interval=2m --timeout=3s --start-period=30s CMD /usr/sbin/syslog-ng-ctl stats || exit 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
build_from:
|
||||
aarch64: ghcr.io/hassio-addons/addon-base/aarch64:v11.0.1
|
||||
amd64: ghcr.io/hassio-addons/addon-base/amd64:v11.0.1
|
||||
armhf: ghcr.io/hassio-addons/addon-base/armhf:v11.0.1
|
||||
armv7: ghcr.io/hassio-addons/addon-base/armv7:v11.0.1
|
||||
i386: ghcr.io/hassio-addons/addon-base/i386:v11.0.1
|
||||
aarch64: ghcr.io/hassio-addons/debian-base/aarch64:5.2.3
|
||||
amd64: ghcr.io/hassio-addons/debian-base/amd64:5.2.3
|
||||
armhf: ghcr.io/hassio-addons/debian-base/armhf:5.2.3
|
||||
armv7: ghcr.io/hassio-addons/debian-base/armv7:5.2.3
|
||||
i386: ghcr.io/hassio-addons/debian-base/i386:5.2.3
|
||||
@@ -14,8 +14,8 @@ arch:
|
||||
- armv7
|
||||
- i386
|
||||
ports:
|
||||
5514/udp: null
|
||||
6601/tcp: null
|
||||
514/udp: null
|
||||
601/tcp: null
|
||||
6514/tcp: null
|
||||
apparmor: false
|
||||
map:
|
||||
@@ -27,7 +27,7 @@ map:
|
||||
journald: true
|
||||
options:
|
||||
custom_conf:
|
||||
location: "/config/syslog-ng/syslog-ng.conf"
|
||||
location: "/config/syslog-ng.conf"
|
||||
schema:
|
||||
custom_conf:
|
||||
location: str
|
||||
|
||||
8
syslog-ng/rootfs/bin/s6-nuke
Normal file
8
syslog-ng/rootfs/bin/s6-nuke
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Glances
|
||||
# This file turns s6-nuke into a NOOP to prevent total termination
|
||||
# of the host system since the add-on runs in the same PID namespace.
|
||||
# ==============================================================================
|
||||
echo "S6-NUKE: NOOP"
|
||||
exit 0
|
||||
15
telegraf/run.sh
Executable file
15
telegraf/run.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bashio
|
||||
declare hostname
|
||||
bashio::require.unprotected
|
||||
|
||||
readonly CONFIG="/etc/telegraf/telegraf.conf"
|
||||
|
||||
CUSTOM_CONF=$(bashio::config 'custom_conf.location')
|
||||
|
||||
bashio::log.info "Using custom conf file"
|
||||
rm /etc/telegraf/telegraf.conf
|
||||
cp "${CUSTOM_CONF}" /etc/telegraf/telegraf.conf
|
||||
|
||||
bashio::log.info "Finished updating config, Starting Telegraf"
|
||||
|
||||
telegraf
|
||||
Reference in New Issue
Block a user