1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-25 15:31:22 +02:00

Updated Docker (markdown)

Nick Sweeting
2024-02-08 14:32:34 -08:00
parent 529bf8c32e
commit 2a973b08b5

@@ -30,8 +30,12 @@ docker pull archivebox/archivebox
- [`docker-compose.yml`](https://github.com/ArchiveBox/ArchiveBox/blob/main/docker-compose.yml) - [`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) - [`archivebox-kubernetes.yml`](https://github.com/ArchiveBox/docker-archivebox/blob/master/archivebox.yml)
<br/>
--- ---
<br/>
<img src="https://github.com/ArchiveBox/ArchiveBox/assets/511499/9e8658f7-7d00-452e-a10e-f7d22ef9365a" height="40px" align="right"/> <img src="https://github.com/ArchiveBox/ArchiveBox/assets/511499/9e8658f7-7d00-452e-a10e-f7d22ef9365a" height="40px" align="right"/>
## Docker Compose ## 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
Docker version 18.09.1, build 4c52b90 # must be >= 17.04.0 Docker version 18.09.1, build 4c52b90 # must be >= 17.04.0
``` ```
<br/>
### Setup ### Setup
@@ -74,13 +79,21 @@ nano docker-compose.yml
docker compose run archivebox update --index-only docker compose run archivebox update --index-only
``` ```
<br/>
### Upgrading ### 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. ➡️ 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. ➡️
<br/>
### Usage ### 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. 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' docker compose run archivebox add --depth=1 'https://example.com/some/feed.rss'
``` ```
<br/>
### Accessing the data ### 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). Then open [`http://127.0.0.1:8000`](http://127.0.0.1:8000).
<br/>
### Configuration ### 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. 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. 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.
<br/>
--- ---
<br/>
## Docker ## Docker
<br/>
### Setup ### Setup
Fetch and run the ArchiveBox Docker image to create your initial archive. 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). 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).
<br/>
### Upgrading ### 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. ➡️ 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. ➡️
<br/>
### Usage ### Usage
```bash
docker run -it archivebox/archivebox help
```
First, make sure you're `cd`'ed into your collection data folder (e.g. `~/archivebox`). 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. 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' docker run -it -v $PWD:/data archivebox/archivebox add --depth=1 'https://example.com/some/rss/feed.xml'
``` ```
<br/>
### Accessing the data ### 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 # then open https://127.0.0.1:8000
``` ```
<br/>
### Configuration ### Configuration
The easiest way is to use `archivebox config --set KEY=value` or edit `./ArchiveBox.conf` (in your collection dir). The easiest way is to use `archivebox config --set KEY=value` or edit `./ArchiveBox.conf` (in your collection dir).