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

Simplify startup and dependencies #165

Merged
merged 3 commits into from
Mar 18, 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
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \

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

COPY rootfs/ /
# 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

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

COPY rootfs/ /

EXPOSE 80/tcp

# Add healthcheck
Expand Down
2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/01-sanity-check/up

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/02-tar1090-update/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/02-tar1090-update/up

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/04-tar1090-configure/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/04-tar1090-configure/up

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/06-range-outline/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/06-range-outline/up

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/07-ngnix-logging/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/07-ngnix-logging/up

This file was deleted.

Empty file.
Empty file.
Empty file.
2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/08-graphs1090/down

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/08-graphs1090/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/08-graphs1090/up

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/09-rtlsdr-biastee/down

This file was deleted.

1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/09-rtlsdr-biastee/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/09-rtlsdr-biastee/up

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/10-telegraf-conf/type

This file was deleted.

2 changes: 0 additions & 2 deletions rootfs/etc/s6-overlay/s6-rc.d/10-telegraf-conf/up

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions rootfs/etc/s6-overlay/s6-rc.d/startup/up
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec /etc/s6-overlay/scripts/startup
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion rootfs/etc/s6-overlay/scripts/readsb
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,4 @@ if chk_enabled "$PROMETHEUS_ENABLE"; then
fi

# shellcheck disable=SC2086
"${s6wrap[@]}" "${READSB_BIN}" "${READSB_CMD[@]}" $READSB_EXTRA_ARGS
exec "${s6wrap[@]}" "${READSB_BIN}" "${READSB_CMD[@]}" $READSB_EXTRA_ARGS
18 changes: 18 additions & 0 deletions rootfs/etc/s6-overlay/scripts/startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/command/with-contenv bash
# shellcheck shell=bash disable=SC1091,SC2076

source /scripts/common

SDIR=/etc/s6-overlay/startup.d

# exit 0 for nonexistent or empty directory
if ! [[ -d "$SDIR" ]] || [[ -z "$(ls "$SDIR")" ]]; then
exit 0
fi

for NAME in "$SDIR"/*; do
if ! s6wrap --quiet --prepend="$NAME" --timestamps --args "$NAME"; then
s6wrap --quiet --prepend=startup --timestamps --args echo Error running "$NAME"
exit 1
fi
done