From c8efa2c068944e8e36baedda649a54b6040bd7a1 Mon Sep 17 00:00:00 2001 From: Nima Nakhostin Date: Sun, 23 Nov 2025 14:20:01 +0330 Subject: [PATCH] Refactor Scraper Dockerfile and Remove Entrypoint Script - Removed the entrypoint.sh script from the scraper Dockerfile to streamline the build process. - Updated the Dockerfile to directly set the ENTRYPOINT to the scraper build executable, simplifying the container startup. - This change enhances maintainability by reducing the number of files and improving clarity in the Docker configuration. --- cmd/scraper/Dockerfile | 6 +----- cmd/scraper/entrypoint.sh | 9 --------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 cmd/scraper/entrypoint.sh diff --git a/cmd/scraper/Dockerfile b/cmd/scraper/Dockerfile index 0cb6b09..a4c7e33 100644 --- a/cmd/scraper/Dockerfile +++ b/cmd/scraper/Dockerfile @@ -17,10 +17,6 @@ WORKDIR /app COPY --from=go-builder /app/scraper-build . -# Copy and set up entrypoint script -COPY cmd/scraper/entrypoint.sh /app/entrypoint.sh -RUN chmod +x /app/entrypoint.sh - EXPOSE 80 -ENTRYPOINT ["/app/entrypoint.sh"] +ENTRYPOINT /app/scraper-build diff --git a/cmd/scraper/entrypoint.sh b/cmd/scraper/entrypoint.sh deleted file mode 100644 index 5cd4f49..0000000 --- a/cmd/scraper/entrypoint.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -set -e - -if [ "$SCRAPER_ONETIME" = "true" ] && [ -n "$FROM_DATE" ] && [ -n "$TO_DATE" ]; then - exec /app/scraper-build -onetime -from "$FROM_DATE" -to "$TO_DATE" -else - exec /app/scraper-build -fi -