Merge pull request #7 from adampweb/master

Vulnerablity fix: Ruby 3.x
This commit is contained in:
Felipe 2025-05-10 11:34:07 -03:00 committed by GitHub
commit 780e45343f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 31 additions and 2 deletions

View File

@ -1,4 +1,4 @@
FROM ruby:3.1.6-alpine FROM ruby:3.4.3-alpine
USER root USER root
WORKDIR /build WORKDIR /build
COPY . /build COPY . /build

View File

@ -74,9 +74,36 @@ services:
tty: true tty: true
image: wayback_machine_downloader:latest image: wayback_machine_downloader:latest
container_name: wayback_machine_downloader container_name: wayback_machine_downloader
environment:
- ENVIRONMENT=${ENVIRONMENT:-development}
- OPTIONS=${OPTIONS:-""}
- TARGET_URL=${TARGET_URL}
volumes: volumes:
- .:/build:rw - .:/build:rw
- ./websites:/build/websites:rw - ./websites:/build/websites:rw
command: --directory /build/websites ${OPTIONS} ${TARGET_URL}
```
#### Usage:
Now You can create a Docker image as named "wayback_machine_downloader" with the following command:
```bash
docker compose up -d --build
```
After that you must set TARGET_URL environment variable:
```bash
export TARGET_URL="https://example.com/"
```
The **OPTIONS** env. variable is optional this may include additional settings which are found in the "**Advanced usage**" section below.
Example:
```bash
export OPTIONS="--list -f 20060121"
```
After that you can run the exists container with the following command:
```bash
docker compose run --rm wayback_machine_downloader https://example.com
``` ```
## ⚙️ Configuration ## ⚙️ Configuration

View File

@ -6,7 +6,9 @@ services:
image: wayback_machine_downloader:latest image: wayback_machine_downloader:latest
container_name: wayback_machine_downloader container_name: wayback_machine_downloader
environment: environment:
- ENVIRONMENT=${ENVIRONMENT} - DEVELOPMENT=${DEVELOPMENT:-production}
- OPTIONS=${OPTIONS:-""}
- TARGET_URL=${TARGET_URL}
volumes: volumes:
- .:/build:rw - .:/build:rw
- ./websites:/build/websites:rw - ./websites:/build/websites:rw