mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-26 15:54:36 +02:00
Updated Docker (markdown)
17
Docker.md
17
Docker.md
@@ -32,7 +32,7 @@ Then open [`http://127.0.0.1:8098`](http://127.0.0.1:8098) or `data/index.html`
|
||||
|
||||
## Usage
|
||||
|
||||
First make sure you're `cd`'ed into the same folder as your `docker-compose.yml` file (e.g. the project root) and that your containers have been started with `docker-compose up -d`.
|
||||
First, make sure you're `cd`'ed into the same folder as your `docker-compose.yml` file (e.g. the project root) and that your containers have been started with `docker-compose up -d`.
|
||||
|
||||
To add new URLs, you can use docker-compose just like the normal `./archive` CLI.
|
||||
|
||||
@@ -41,21 +41,22 @@ To add an individual link or list of links, pass in URLs via stdin.
|
||||
echo "https://example.com" | docker-compose exec -T archivebox /bin/archive
|
||||
```
|
||||
|
||||
To pull in links from a feed or list of links, pass the URL or path to the feed as an argument.
|
||||
```bash
|
||||
docker-compose exec archivebox /bin/archive https://example.com/some/feed.rss
|
||||
```
|
||||
To import links from a file you can either `cat` the file and pass it via stdin like above, or move it into your data folder so that ArchiveBox can access it from within the container.
|
||||
```bash
|
||||
mv ~/Downloads/bookmarks.html data/sources/bookmarks.html
|
||||
docker-compose exec archivebox /bin/archive /data/sources/bookmarks.html
|
||||
```
|
||||
|
||||
To pull in links from a feed or list of links, pass the URL or path to the feed as an argument. Passing a URL as an argument here does not archive the specified URL, it downloads it and archives the links *inside* of it, so only use it for RSS feeds or other *lists of links* you want to add. To add an individual link you want to archive use the instruction above and pass via stdin instead of by argument.
|
||||
```bash
|
||||
docker-compose exec archivebox /bin/archive https://example.com/some/feed.rss
|
||||
```
|
||||
|
||||
## Accessing the data
|
||||
|
||||
The outputted archive data is stored in `data/` (relative to the project root), or whatever folder path you specified in the `docker-compose.yml` `volumes:` section.
|
||||
|
||||
To access your archive, you can open `data/index.html` directly, or you can use the provided nginx server running inside docker on [`http://127.0.0.1:8098`](http://127.0.0.1:8098).
|
||||
To access your archive, you can open `data/index.html` directly, or you can use the provided Nginx server running inside docker on [`http://127.0.0.1:8098`](http://127.0.0.1:8098).
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -65,11 +66,11 @@ The recommended way is to edit the `environment:` section in `docker-compose.yml
|
||||
|
||||
You can also specify an env file via CLI when running compose using `docker-compose --env-file=/path/to/config.env ...` although you must specify the variables in the `environment:` section that you want to have passed down to the ArchiveBox container from the passed env file.
|
||||
|
||||
If you want to access your archive server with HTTPS, put a reverse proxy like Nginx or Caddy in front of `127.0.0.1:8098` to do SSL termination.
|
||||
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:8098` to do SSL termination. You can find many instructions to do this online if you search "SSL reverse proxy".
|
||||
|
||||
# Docker
|
||||
|
||||
Docker-compose is the recommended way to run ArchiveBox with docker, as it's a much easier CLI interface and more of the setup is taken care of by docker-compose using the single yaml config file as opposed to CLI flags. The docker-compose setup also provides an nginx webserver to serve the archive right out of the box, whereas you have to set that up manually if you use plain docker.
|
||||
Docker-compose (above) is the recommended way to run ArchiveBox with docker, as it's a much easier CLI interface and more of the setup is taken care of by docker-compose using the single yaml config file as opposed to CLI flags. The docker-compose setup also provides an Nginx webserver to serve the archive right out of the box, whereas you have to set that up manually if you use plain Docker.
|
||||
|
||||
If you want to continue and use raw docker (below) instead of docker-compose (above), follow these steps.
|
||||
|
||||
|
Reference in New Issue
Block a user