From 58519e2dc96505875e60b0baca4087a7c5bd20ac Mon Sep 17 00:00:00 2001 From: Oleksander Piskun Date: Tue, 15 Apr 2025 09:41:31 +0300 Subject: [PATCH] feat: easier HaRP adoption - modified start.sh to accept an entrypoint arg Signed-off-by: Oleksander Piskun --- Dockerfile | 2 +- Makefile | 2 +- start.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0fc5ebe..2b9264b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,5 +53,5 @@ COPY --chmod=775 start.sh / # Set working directory and define entrypoint/healthcheck. WORKDIR /ex_app/lib -ENTRYPOINT ["/start.sh"] +ENTRYPOINT ["/start.sh", "python3", "main.py"] HEALTHCHECK --interval=2s --timeout=2s --retries=300 CMD /healthcheck.sh diff --git a/Makefile b/Makefile index f82273d..e0e6a0e 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ help: .PHONY: build-push build-push: - docker login ghcr.io + # docker login ghcr.io DOCKER_BUILDKIT=1 docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/nextcloud/app-skeleton-python:latest . .PHONY: run30 diff --git a/start.sh b/start.sh index 665bdbb..82eaeb3 100644 --- a/start.sh +++ b/start.sh @@ -60,6 +60,6 @@ if [ -f /frpc.toml ] && [ -n "$HP_SHARED_KEY" ]; then frpc -c /frpc.toml & fi -# Start the main application (adjust it for your ExApp) -echo "Starting main application..." -exec python3 main.py +# Start the main application (launch cmd for ExApp is an argument for this script) +echo "Starting application: $@" +exec "$@"