From acec026ce13251436af7aded28b7556bf3d8905b Mon Sep 17 00:00:00 2001 From: adampweb Date: Sun, 6 Apr 2025 12:36:31 +0200 Subject: [PATCH] Using Docker Compose --- .dockerignore | 5 +++++ README.md | 17 +++++++++++++++++ docker-compose.yml | 10 ++++++++++ 3 files changed, 32 insertions(+) create mode 100644 .dockerignore create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c0bee63 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +*.md +*.yml + +.github +websites \ No newline at end of file diff --git a/README.md b/README.md index 953f517..bf9c8e2 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,23 @@ docker build -t wayback_machine_downloader . 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 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: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c7af014 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +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 \ No newline at end of file