diff --git a/docker-compose.yml b/docker-compose.yml index c7af014..053a11b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,9 @@ services: tty: true image: wayback_machine_downloader:latest container_name: wayback_machine_downloader + environment: + - ENVIRONMENT=${ENVIRONMENT} volumes: - .:/build:rw - - ./websites:/build/websites:rw \ No newline at end of file + - ./websites:/build/websites:rw + command: --directory /build/websites ${OPTIONS} ${TARGET_URL} \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..bfbc4fc --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ "$ENVIRONMENT" == "development" ]; then + echo "Running in development mode. Starting rerun..." + exec rerun --dir /build --ignore "websites/*" -- /build/bin/wayback_machine_downloader "$@" +else + echo "Not in development mode. Skipping rerun." + exec /build/bin/wayback_machine_downloader "$@" +fi \ No newline at end of file