From ab7170ddd3592283d5920e7a8a36e2e1d7fd48b9 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 23 Jan 2024 17:52:12 -0800 Subject: [PATCH 1/6] Update README.md --- README.md | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1fe234ec..d43f7cd7 100644 --- a/README.md +++ b/README.md @@ -417,31 +417,52 @@ For more discussion on managed and paid hosting options see here: [!TIP] +> Whether in Docker or not, ArchiveBox commands all work the same way, and can be used in tandem to access the same data directory. +> For example, you can run the web server in Docker Compose, and run one-off commands on the host at the same time with `pip`-installed ArchiveBox. + +```bash +# e.g. archivebox add --depth=1 'https://news.ycombinator.com' +# or docker compose run archivebox --depth=1 'https://news.ycombinator.com' +# or docker run -it -v $PWD:/data archivebox/archivebox add --depth=1 'https://news.ycombinator.com' +``` + +#### Bare Metal Usage (`pip`/`apt`/`brew`/etc.) +```bash +archivebox init --setup # safe to run init multiple times (also how you update versions) +archivebox version # get archivebox version info and more +archivebox add --depth=1 'https://news.ycombinator.com' +``` + +##### Docker Compose Usage +```bash +# make sure you have `docker-compose.yml` from the Quickstart instructions first +docker compose run archivebox init --setup +docker compose run archivebox version +docker compose run archivebox add --depth=1 'https://news.ycombinator.com' +``` + +#### Docker Usage +```bash +docker run -v $PWD:/data -it archivebox/archivebox init --setup +docker run -v $PWD:/data -it archivebox/archivebox version +``` + +#### Next Steps + - `archivebox help/version` to see the list of available subcommands and currently installed version info - `archivebox setup/init/config/status/manage` to administer your collection - `archivebox add/schedule/remove/update/list/shell/oneshot` to manage Snapshots in the archive - `archivebox schedule` to pull in fresh URLs regularly from [bookmarks/history/Pocket/Pinboard/RSS/etc.](#input-formats) -*Docker hint:* Because ArchiveBox commands all work the same way, you can run the UI server -in Docker Compose, but run one-off commands on the host without needing Docker (just `cd data/; pip install archivebox; archivebox status`). #### 🖥  Web UI Usage +##### Start the Web Server ```bash +# Bare metal (pip/apt/brew/etc): archivebox server 0.0.0.0:8000 # open http://127.0.0.1:8000 to view it -# Optional: -archivebox manage createsuperuser # create new admin username & pass -archivebox config --set PUBLIC_ADD_VIEW=False # True = allow anyone to submit URLs -archivebox config --set PUBLIC_SNAPSHOTS=False # True = allow anyone to see snapshot content -archivebox config --set PUBLIC_INDEX=False # True = allow anyone to see list of all snapshots +# Docker Compose: +docker compose up +# Docker: +docker run -v $PWD:/data -it -p 8000:8000 archivebox/archivebox ``` + +##### Allow Public Access or Create an Admin User +```bash +archivebox manage createsuperuser # create a new admin username & pass +# OR # OR +archivebox config --set PUBLIC_ADD_VIEW=True # allow guests to submit URLs +archivebox config --set PUBLIC_SNAPSHOTS=True # allow guests to see snapshot content +archivebox config --set PUBLIC_INDEX=True # allow guests to see list of all snapshots + +# restart the server to apply any config changes +``` + *Docker hint:* Set the [`ADMIN_USERNAME` & `ADMIN_PASSWORD`)](https://github.com/ArchiveBox/ArchiveBox/wiki/Configuration#admin_username--admin_password) env variables to auto-create an admin user on first-run. #### 🗄  SQL/Python/Filesystem Usage From 4146c1d673a7003498e585bd5f079a6182fec08f Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 23 Jan 2024 18:22:36 -0800 Subject: [PATCH 3/6] Update README.md --- README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index bd097c2d..aa7a92b8 100644 --- a/README.md +++ b/README.md @@ -426,16 +426,6 @@ cd ~/archivebox/data # IMPORTANT: cd into the directory # archivebox [subcommand] [--args] ``` -> [!TIP] -> Whether in Docker or not, ArchiveBox commands all work the same way, and can be used in tandem to access the same data directory. -> For example, you can run the web server in Docker Compose, and run one-off commands on the host at the same time with `pip`-installed ArchiveBox. - -```bash -# e.g. archivebox add --depth=1 'https://news.ycombinator.com' -# or docker compose run archivebox --depth=1 'https://news.ycombinator.com' -# or docker run -it -v $PWD:/data archivebox/archivebox add --depth=1 'https://news.ycombinator.com' -``` - #### Bare Metal Usage (`pip`/`apt`/`brew`/etc.) ```bash archivebox init --setup # safe to run init multiple times (also how you update versions) @@ -464,6 +454,18 @@ docker run -v $PWD:/data -it archivebox/archivebox version - `archivebox add/schedule/remove/update/list/shell/oneshot` to manage Snapshots in the archive - `archivebox schedule` to pull in fresh URLs regularly from [bookmarks/history/Pocket/Pinboard/RSS/etc.](#input-formats) +> [!TIP] +> Whether in Docker or not, ArchiveBox commands all work the same way, and can be used in tandem to access the same data directory. +> For example, you can run the Web UI in Docker Compose, and run one-off commands on host with `pip`-installed ArchiveBox or in Docker interchangeably. + +```bash +docker compose up -d # start the Web UI server in the background +docker compose run archivebox add 'https://example.com' # add a test URL to snapshot w/ Docker Compose + +archivebox list 'https://example.com' # fetch it with pip-installed archivebox on the host +docker compose run archivebox list 'https://example.com' # or w/ Docker Compose +docker run -it -v $PWD:/data archivebox/archivebox list 'https://example.com' # or w/ Docker, all equivalent +``` #### 🖥  Web UI Usage From 2cddb61877ff74dba93fb6234352adc57952eb1a Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 23 Jan 2024 18:27:48 -0800 Subject: [PATCH 4/6] Update README.md --- README.md | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index aa7a92b8..881ffa1a 100644 --- a/README.md +++ b/README.md @@ -426,26 +426,48 @@ cd ~/archivebox/data # IMPORTANT: cd into the directory # archivebox [subcommand] [--args] ``` -#### Bare Metal Usage (`pip`/`apt`/`brew`/etc.) -```bash +##### Bare Metal Usage (`pip`/`apt`/`brew`/etc.) + +
+
+Click to expand... +
+ +

 archivebox init --setup      # safe to run init multiple times (also how you update versions)
 archivebox version           # get archivebox version info and more
 archivebox add --depth=1 'https://news.ycombinator.com'
-```
+
+
+
##### Docker Compose Usage -```bash + +
+Click to expand... +
+ +

 # make sure you have `docker-compose.yml` from the Quickstart instructions first
 docker compose run archivebox init --setup
 docker compose run archivebox version
 docker compose run archivebox add --depth=1 'https://news.ycombinator.com'
-```
+
-#### Docker Usage -```bash +
+ +##### Docker Usage + +
+Click to expand... +
+ +

 docker run -v $PWD:/data -it archivebox/archivebox init --setup
 docker run -v $PWD:/data -it archivebox/archivebox version
-```
+
+ +
#### Next Steps @@ -458,14 +480,21 @@ docker run -v $PWD:/data -it archivebox/archivebox version > Whether in Docker or not, ArchiveBox commands all work the same way, and can be used in tandem to access the same data directory. > For example, you can run the Web UI in Docker Compose, and run one-off commands on host with `pip`-installed ArchiveBox or in Docker interchangeably. -```bash +
+
+Expand to show example... +
+ +

 docker compose up -d                                      # start the Web UI server in the background
 docker compose run archivebox add 'https://example.com'   # add a test URL to snapshot w/ Docker Compose
 
 archivebox list 'https://example.com'                     # fetch it with pip-installed archivebox on the host
 docker compose run archivebox list 'https://example.com'                       # or w/ Docker Compose
 docker run -it -v $PWD:/data archivebox/archivebox list 'https://example.com'  # or w/ Docker, all equivalent
-```
+
+ +
#### 🖥  Web UI Usage From e193e48afff19361e85bdcf28bbb2bb883485108 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 23 Jan 2024 18:29:41 -0800 Subject: [PATCH 5/6] Update README.md --- README.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 881ffa1a..78c1de1e 100644 --- a/README.md +++ b/README.md @@ -437,12 +437,13 @@ cd ~/archivebox/data # IMPORTANT: cd into the directory archivebox init --setup # safe to run init multiple times (also how you update versions) archivebox version # get archivebox version info and more archivebox add --depth=1 'https://news.ycombinator.com' - + ##### Docker Compose Usage +
Click to expand...
@@ -458,6 +459,7 @@ docker compose run archivebox add --depth=1 'https://news.ycombinator.com' ##### Docker Usage +
Click to expand...
@@ -479,22 +481,14 @@ docker run -v $PWD:/data -it archivebox/archivebox version > [!TIP] > Whether in Docker or not, ArchiveBox commands all work the same way, and can be used in tandem to access the same data directory. > For example, you can run the Web UI in Docker Compose, and run one-off commands on host with `pip`-installed ArchiveBox or in Docker interchangeably. - -
-
-Expand to show example... -
- -

+> 
Expand to show example...

 docker compose up -d                                      # start the Web UI server in the background
 docker compose run archivebox add 'https://example.com'   # add a test URL to snapshot w/ Docker Compose
 
 archivebox list 'https://example.com'                     # fetch it with pip-installed archivebox on the host
 docker compose run archivebox list 'https://example.com'                       # or w/ Docker Compose
 docker run -it -v $PWD:/data archivebox/archivebox list 'https://example.com'  # or w/ Docker, all equivalent
-
- -
+
#### 🖥  Web UI Usage From bddea22dac705b429bae6d4cfb375169231d4a57 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 23 Jan 2024 18:31:44 -0800 Subject: [PATCH 6/6] Update README.md --- README.md | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 78c1de1e..625ca8d5 100644 --- a/README.md +++ b/README.md @@ -426,6 +426,25 @@ cd ~/archivebox/data # IMPORTANT: cd into the directory # archivebox [subcommand] [--args] ``` +> [!TIP] +> Whether in Docker or not, ArchiveBox commands all work the same way, and can be used in tandem to access the same data directory. +> For example, you can run the Web UI in Docker Compose, and run one-off commands on host with `pip`-installed ArchiveBox or in Docker interchangeably. + +
+Expand to show examples...
+ +

+docker compose up -d                                      # start the Web UI server in the background
+docker compose run archivebox add 'https://example.com'   # add a test URL to snapshot w/ Docker Compose
+
+archivebox list 'https://example.com'                     # fetch it with pip-installed archivebox on the host
+docker compose run archivebox list 'https://example.com'                       # or w/ Docker Compose
+docker run -it -v $PWD:/data archivebox/archivebox list 'https://example.com'  # or w/ Docker, all equivalent
+
+ +
+
+ ##### Bare Metal Usage (`pip`/`apt`/`brew`/etc.)
@@ -440,6 +459,7 @@ archivebox add --depth=1 'https://news.ycombinator.com'
+
##### Docker Compose Usage @@ -456,6 +476,7 @@ docker compose run archivebox add --depth=1 'https://news.ycombinator.com'
+
##### Docker Usage @@ -470,6 +491,7 @@ docker run -v $PWD:/data -it archivebox/archivebox version +
#### Next Steps @@ -478,17 +500,6 @@ docker run -v $PWD:/data -it archivebox/archivebox version - `archivebox add/schedule/remove/update/list/shell/oneshot` to manage Snapshots in the archive - `archivebox schedule` to pull in fresh URLs regularly from [bookmarks/history/Pocket/Pinboard/RSS/etc.](#input-formats) -> [!TIP] -> Whether in Docker or not, ArchiveBox commands all work the same way, and can be used in tandem to access the same data directory. -> For example, you can run the Web UI in Docker Compose, and run one-off commands on host with `pip`-installed ArchiveBox or in Docker interchangeably. ->
Expand to show example...

-docker compose up -d                                      # start the Web UI server in the background
-docker compose run archivebox add 'https://example.com'   # add a test URL to snapshot w/ Docker Compose
-
-archivebox list 'https://example.com'                     # fetch it with pip-installed archivebox on the host
-docker compose run archivebox list 'https://example.com'                       # or w/ Docker Compose
-docker run -it -v $PWD:/data archivebox/archivebox list 'https://example.com'  # or w/ Docker, all equivalent
-
#### 🖥  Web UI Usage