Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphs1090 reduce io logic fix #192

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ ENV BEASTPORT=30005 \

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# only copy files necessary for the build, copy whole rootfs later
# this improves build caching when changing service and startup scripting
COPY rootfs/tar1090-install.sh /
COPY rootfs/etc/nginx.tar1090 /etc/nginx.tar1090
#COPY rootfs/tar1090-install.sh /
#COPY rootfs/etc/nginx.tar1090 /etc/nginx.tar1090
# for dev testing, rootfs copy can be moved after run, then these two lines above are needed

COPY rootfs/ /

# add telegraf binary
##telegraf##COPY --from=telegraf /usr/bin/telegraf /usr/bin/telegraf
Expand Down Expand Up @@ -183,8 +184,6 @@ RUN set -x && \
popd && \
rm -rf /tmp/*

COPY rootfs/ /

EXPOSE 80/tcp

# Add healthcheck
Expand Down
5 changes: 4 additions & 1 deletion rootfs/etc/s6-overlay/scripts/collectd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ fi
PERMFILE=/var/lib/collectd/rrd/localhost.tar.gz
if chk_enabled "${GRAPHS1090_REDUCE_IO}"; then
# readback rrd database from compressed archive
s6wrap --quiet --prepend=graphs1090-readback --timestamps --args bash /usr/share/graphs1090/readback.sh
if ! s6wrap --quiet --prepend=graphs1090-readback --timestamps --args bash /usr/share/graphs1090/readback.sh; then
s6wrap --quiet --prepend=graphs1090-readback --timestamps --args echo "FATAL: readback returned an error"
exec sleep infinity
fi
elif [[ -f "${PERMFILE}" ]] && ! [[ -d /var/lib/collectd/rrd/localhost ]]; then
# extract rrd database from compressed archive (in case WAS enabled)
if s6wrap --quiet --prepend=graphs1090-extract --timestamps --args bash /usr/share/graphs1090/gunzip.sh /var/lib/collectd/rrd/localhost; then
Expand Down