From 2a973b08b5fb0b94b4b96939395302d60238bc46 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 8 Feb 2024 14:32:34 -0800 Subject: [PATCH] Updated Docker (markdown) --- Docker.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Docker.md b/Docker.md index 8220ffb..c6afcad 100644 --- a/Docker.md +++ b/Docker.md @@ -30,8 +30,12 @@ docker pull archivebox/archivebox - [`docker-compose.yml`](https://github.com/ArchiveBox/ArchiveBox/blob/main/docker-compose.yml) - [`archivebox-kubernetes.yml`](https://github.com/ArchiveBox/docker-archivebox/blob/master/archivebox.yml) +
+ --- +
+ ## Docker Compose @@ -44,6 +48,7 @@ Just make sure you have a Docker version that's [new enough](https://docs.docker docker --version Docker version 18.09.1, build 4c52b90 # must be >= 17.04.0 ``` +
### Setup @@ -74,13 +79,21 @@ nano docker-compose.yml docker compose run archivebox update --index-only ``` +
+ ### Upgrading See the wiki page on [Upgrading or Merging Archives: Upgrading with Docker Compose](https://github.com/ArchiveBox/ArchiveBox/wiki/Upgrading-or-Merging-Archives#upgrading-with-docker-compose-%EF%B8%8F) for instructions. ➡️ +
+ ### Usage -First, make sure you're `cd`'ed into the same folder as your `docker-compose.yml` file (e.g. the project root). +```bash +docker compose run archivebox help +``` + +First, make sure you're `cd`'ed into the same folder as your `docker-compose.yml` file (e.g. `~/archivebox`). To add new URLs, you can use `docker compose run archivebox [subcommand]` just like the non-Docker `archivebox [subcommand]` CLI. @@ -114,6 +127,7 @@ docker compose run archivebox add 'https://example.com/some/feed.rss' docker compose run archivebox add --depth=1 'https://example.com/some/feed.rss' ``` +
### Accessing the data @@ -128,6 +142,8 @@ docker compose up # add -d to run in the background Then open [`http://127.0.0.1:8000`](http://127.0.0.1:8000). +
+ ### Configuration ArchiveBox running with `docker compose` accepts all the same config options as other ArchiveBox distributions, see the full list of options available on the [[Configuration]] page. @@ -161,10 +177,16 @@ You can also specify an env file via CLI when running compose using `docker comp If you want to access your archive server with HTTPS, put a reverse proxy like Nginx or Caddy in front of `http://127.0.0.1:8000` to do SSL termination. Here is an example [ArchiveBox nginx container](https://github.com/ArchiveBox/ArchiveBox/blob/main/docker-compose.yml#:~:text=nginx) + [`nginx.conf`](https://github.com/ArchiveBox/ArchiveBox/blob/main/etc/nginx.conf) that you can modify to add your preferred TLS settings. +
+ --- +
+ ## Docker +
+ ### Setup Fetch and run the ArchiveBox Docker image to create your initial archive. @@ -180,12 +202,20 @@ docker run -it -v $PWD:/data archivebox/archivebox init --setup If you encounter permissions issues, you may need configure user/group ownership explicitly with [`PUID`/`PGID`](https://github.com/ArchiveBox/ArchiveBox/wiki/Configuration#puid--pgid). +
+ ### Upgrading See the wiki page on [Upgrading or Merging Archives: Upgrading with plain Docker](https://github.com/ArchiveBox/ArchiveBox/wiki/Upgrading-or-Merging-Archives#upgrading-with-plain-docker) for instructions. ➡️ +
+ ### Usage +```bash +docker run -it archivebox/archivebox help +``` + First, make sure you're `cd`'ed into your collection data folder (e.g. `~/archivebox`). The Docker CLI `docker run ... archivebox/archivebox [subcommand]` works just like the non-Docker `archivebox [subcommand]` CLI. @@ -210,6 +240,7 @@ You can also use the `--depth=1` flag to tell ArchiveBox to recursively archive docker run -it -v $PWD:/data archivebox/archivebox add --depth=1 'https://example.com/some/rss/feed.xml' ``` +
### Accessing the data @@ -226,6 +257,8 @@ docker run -it -v /media/USB_DRIVE/archivebox:/data -p 8000:8000 archivebox/arch # then open https://127.0.0.1:8000 ``` +
+ ### Configuration The easiest way is to use `archivebox config --set KEY=value` or edit `./ArchiveBox.conf` (in your collection dir).