mirror of
https://github.com/casjaysdevdocker/opengist
synced 2025-12-01 10:13:26 -05:00
🗃️ Update codebase 🗃️
Dockerfile rootfs/usr/local/bin/entrypoint.sh
This commit is contained in:
@@ -156,7 +156,7 @@ RUN echo "Custom Applications"; \
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
RUN echo "Running custom commands"; \
|
RUN echo "Running custom commands"; \
|
||||||
if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";/root/docker/setup/05-custom.sh||{ echo "Failed to execute /root/docker/setup/05-custom.sh" && exit 10; };echo "Done running the custom script";fi; \
|
if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";/root/docker/setup/05-custom.sh||{ echo "Failed to execute /root/docker/setup/05-custom.sh" >&2 && exit 10; };echo "Done running the custom script";fi; \
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
RUN echo "Running final commands before cleanup"; \
|
RUN echo "Running final commands before cleanup"; \
|
||||||
@@ -254,6 +254,5 @@ EXPOSE ${SERVICE_PORT} ${ENV_PORTS}
|
|||||||
|
|
||||||
STOPSIGNAL SIGRTMIN+3
|
STOPSIGNAL SIGRTMIN+3
|
||||||
|
|
||||||
CMD [ "/usr/local/bin/entrypoint.sh" ]
|
ENTRYPOINT [ "tini", "-p", "SIGTERM","--", "/usr/local/bin/entrypoint.sh" ]
|
||||||
ENTRYPOINT [ "tini", "-p", "SIGTERM","--" ]
|
|
||||||
HEALTHCHECK --start-period=10m --interval=5m --timeout=15s CMD [ "/usr/local/bin/entrypoint.sh", "healthcheck" ]
|
HEALTHCHECK --start-period=10m --interval=5m --timeout=15s CMD [ "/usr/local/bin/entrypoint.sh", "healthcheck" ]
|
||||||
|
|||||||
@@ -401,26 +401,23 @@ __run_message
|
|||||||
# Just start services
|
# Just start services
|
||||||
START_SERVICES="${START_SERVICES:-SYSTEM_INIT}"
|
START_SERVICES="${START_SERVICES:-SYSTEM_INIT}"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Never start services for these options
|
# Determine if we should start services based on command
|
||||||
[ "$1" = "cron" ] && START_SERVICES="no"
|
SKIP_SERVICE_START="no"
|
||||||
[ "$1" = "tail" ] && START_SERVICES="no"
|
[ "$1" = "init" ] && SKIP_SERVICE_START="yes" && CONTAINER_INIT="yes"
|
||||||
[ "$1" = "logs" ] && START_SERVICES="no"
|
[ "$2" = "init" ] && SKIP_SERVICE_START="yes" && CONTAINER_INIT="yes"
|
||||||
[ "$1" = "cron" ] && START_SERVICES="no"
|
echo "$1" | grep -qE '^(sh|bash)$|/*/(sh|bash)$' && SKIP_SERVICE_START="yes"
|
||||||
[ "$1" = "backup" ] && START_SERVICES="no"
|
|
||||||
[ "$1" = "healthcheck" ] && START_SERVICES="no"
|
|
||||||
[ "$1" = "init" ] && START_SERVICES="no" && CONTAINER_INIT="yes"
|
|
||||||
[ "$2" = "init" ] && START_SERVICES="no" && CONTAINER_INIT="yes"
|
|
||||||
echo "$1" | grep -qE '^(sh|bash)$|/*/(sh|bash)$' && START_SERVICES="no"
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Start all services if no pidfile
|
# Start all services if no pidfile and not skipping
|
||||||
if [ "$START_SERVICES" = "yes" ] || [ -z "$1" ]; then
|
if [ "$START_SERVICES" = "yes" ] || [ -z "$1" ]; then
|
||||||
[ "$1" = "start" ] && shift 1
|
if [ "$SKIP_SERVICE_START" = "no" ]; then
|
||||||
[ "$1" = "all" ] && shift 1
|
[ "$1" = "start" ] && shift 1
|
||||||
rm -Rf "/run"/*/*pid 2>/dev/null || true
|
[ "$1" = "all" ] && shift 1
|
||||||
echo "$$" >"$ENTRYPOINT_PID_FILE"
|
rm -Rf "/run"/*/*pid 2>/dev/null || true
|
||||||
__start_init_scripts "/usr/local/etc/docker/init.d"
|
echo "$$" >"$ENTRYPOINT_PID_FILE"
|
||||||
|
__start_init_scripts "/usr/local/etc/docker/init.d"
|
||||||
|
CONTAINER_INIT="${CONTAINER_INIT:-no}"
|
||||||
|
fi
|
||||||
START_SERVICES="no"
|
START_SERVICES="no"
|
||||||
CONTAINER_INIT="${CONTAINER_INIT:-no}"
|
|
||||||
fi
|
fi
|
||||||
export START_SERVICES CONTAINER_INIT ENTRYPOINT_PID_FILE
|
export START_SERVICES CONTAINER_INIT ENTRYPOINT_PID_FILE
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|||||||
Reference in New Issue
Block a user