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.
This commit is contained in:
@@ -17,10 +17,6 @@ WORKDIR /app
|
|||||||
|
|
||||||
COPY --from=go-builder /app/scraper-build .
|
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
|
EXPOSE 80
|
||||||
|
|
||||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
ENTRYPOINT /app/scraper-build
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user