mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-17 17:56:44 +00:00
commit
dc71d1d167
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
*.md
|
||||||
|
*.yml
|
||||||
|
|
||||||
|
.github
|
||||||
|
websites
|
||||||
4
.env.example
Normal file
4
.env.example
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
DB_HOST="db"
|
||||||
|
DB_USER="root"
|
||||||
|
DB_PASSWORD="example1234"
|
||||||
|
DB_NAME="wayback"
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
@ -18,6 +18,11 @@ Gemfile.lock
|
|||||||
.ruby-version
|
.ruby-version
|
||||||
.rbenv*
|
.rbenv*
|
||||||
|
|
||||||
|
## ENV
|
||||||
|
*.env*
|
||||||
|
!.env*.example
|
||||||
|
|
||||||
|
|
||||||
## RCOV
|
## RCOV
|
||||||
coverage.data
|
coverage.data
|
||||||
|
|
||||||
|
|||||||
17
README.md
17
README.md
@ -62,6 +62,23 @@ docker build -t wayback_machine_downloader .
|
|||||||
docker run -it --rm wayback_machine_downloader [options] URL
|
docker run -it --rm wayback_machine_downloader [options] URL
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 🐳 Using Docker Compose
|
||||||
|
|
||||||
|
We can also use it with Docker Compose, which provides a lot of benefits for extending more functionalities (such as implementing storing previous downloads in a database):
|
||||||
|
```yaml
|
||||||
|
# docker-compose.yml
|
||||||
|
services:
|
||||||
|
wayback_machine_downloader:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
tty: true
|
||||||
|
image: wayback_machine_downloader:latest
|
||||||
|
container_name: wayback_machine_downloader
|
||||||
|
volumes:
|
||||||
|
- .:/build:rw
|
||||||
|
- ./websites:/build/websites:rw
|
||||||
|
```
|
||||||
|
|
||||||
## ⚙️ Configuration
|
## ⚙️ Configuration
|
||||||
There are a few constants that can be edited in the `wayback_machine_downloader.rb` file for your convenience. The default values may be conservative, so you can adjust them to your needs. They are:
|
There are a few constants that can be edited in the `wayback_machine_downloader.rb` file for your convenience. The default values may be conservative, so you can adjust them to your needs. They are:
|
||||||
|
|
||||||
|
|||||||
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
services:
|
||||||
|
wayback_machine_downloader:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
tty: true
|
||||||
|
image: wayback_machine_downloader:latest
|
||||||
|
container_name: wayback_machine_downloader
|
||||||
|
environment:
|
||||||
|
- ENVIRONMENT=${ENVIRONMENT}
|
||||||
|
volumes:
|
||||||
|
- .:/build:rw
|
||||||
|
- ./websites:/build/websites:rw
|
||||||
|
command: --directory /build/websites ${OPTIONS} ${TARGET_URL}
|
||||||
9
entrypoint.sh
Normal file
9
entrypoint.sh
Normal file
@ -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
|
||||||
Loading…
x
Reference in New Issue
Block a user