Refactor Scraper Dockerfile and Add Entrypoint Script
- Replaced inline entrypoint script creation in the Dockerfile with a separate entrypoint.sh file for better maintainability and clarity. - The new entrypoint script handles one-time scraping with date range support, improving the scraper's functionality and usability.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
#!/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