-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from experius/release/0.2.0
Release/0.2.0
- Loading branch information
Showing
6 changed files
with
47 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
 | ||
|
||
#SeoSnap Beta | ||
|
||
Setup for the whole seosnap stack including dashboard, cache server and cache warmer used for prerendering and full | ||
page caching PWA's. | ||
|
||
# Installation | ||
* Pull the repo | ||
* Pull the repo (*note: the pull is recursive*) | ||
``` | ||
git clone --recursive [email protected]:experius/SeoSnap.git | ||
``` | ||
|
@@ -15,12 +13,6 @@ git clone --recursive [email protected]:experius/SeoSnap.git | |
``` | ||
docker-compose up --build -d && docker-compose down | ||
``` | ||
Wait 5 seconds and then build again | ||
``` | ||
docker-compose up --build | ||
``` | ||
|
||
Everything should run now | ||
|
||
# Usage | ||
* Dashboard: http://127.0.0.1:8080/ (default login: snaptron/Sn@ptron1337) | ||
|
@@ -35,7 +27,7 @@ Cache directory ./cache | |
## Run cache warmer | ||
Make sure you have created a website via dashboard http://127.0.0.1:8080/seosnap/website/add/ | ||
``` | ||
docker-compose run cachewarmer <website id> | ||
docker-compose run cachewarmer cache <website id> | ||
``` | ||
|
||
## Nginx | ||
|
@@ -57,4 +49,40 @@ When the crawler is started it connects with the dashboard api. It uses scrapy t | |
The cache server is a simple file caching server. If a file exist with the content of the page it serves the html from the file. If not, it renders the requested url with rendertron and saves the html output in a file. To refresh the cache the cache-warmer uses PUT requests instead of GET. This will force update from the cache file. | ||
|
||
# Build with | ||
 | ||
 | ||
|
||
## Usage cache warmer [See](https://github.com/experius/SeoSnap-Cache-Warmer/blob/master/README.md) | ||
### Commands | ||
#### Cache | ||
Handles caching of pages associated to given website | ||
``` | ||
Usage: crawl.py cache [OPTIONS] WEBSITE_IDS | ||
Options: | ||
--follow_next BOOLEAN Follows rel-next links if enabled | ||
--recache BOOLEAN Recached all pages instead of not yet cached ones | ||
--use_queue BOOLEAN Cache urls from the queue instead of the sitemap | ||
--load BOOLEAN Whether already loaded urls should be scraped instead | ||
--help Show this message and exit. | ||
``` | ||
|
||
#### Clean | ||
Handles cleaning of the dashboard queue | ||
``` | ||
Usage: crawl.py clean [OPTIONS] WEBSITE_IDS | ||
Options: | ||
--help Show this message and exit. | ||
``` | ||
|
||
### Examples | ||
``` | ||
# Cache the sitemap of website 1 | ||
docker-compose run cachewarmer cache 1 | ||
# Cache requests in queue for websites 1 and 2 | ||
dc run cachewarmer cache 1,2 use_queue=true | ||
# Clean the queue for websites 1 and 2 | ||
docker-compose run cachewarmer clean 1,2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule seosnap-cacheserver
updated
4 files
+2 −1 | README.md | |
+20 −2 | rendertron_cache_server/cache/cache.py | |
+12 −3 | rendertron_cache_server/server.py | |
+1 −0 | rendertron_cache_server/utils.py |
Submodule seosnap-cachewarmer
updated
9 files
+36 −1 | README.md | |
+52 −5 | crawl.py | |
+1 −0 | requirements.txt | |
+16 −1 | seosnap_cachewarmer/exporter.py | |
+6 −4 | seosnap_cachewarmer/middleware.py | |
+1 −1 | seosnap_cachewarmer/pipelines.py | |
+19 −2 | seosnap_cachewarmer/service.py | |
+15 −30 | seosnap_cachewarmer/spider.py | |
+71 −0 | seosnap_cachewarmer/state.py |
Submodule seosnap-dashboard
updated
28 files
+2 −2 | requirements.txt | |
+0 −148 | seosnap/admin.py | |
+5 −0 | seosnap/admin/__init__.py | |
+45 −0 | seosnap/admin/base.py | |
+30 −0 | seosnap/admin/extract_field.py | |
+67 −0 | seosnap/admin/page.py | |
+47 −0 | seosnap/admin/queue.py | |
+77 −0 | seosnap/admin/website.py | |
+29 −0 | seosnap/helpers/permissons.py | |
+29 −0 | seosnap/migrations/0003_queueitem.py | |
+0 −85 | seosnap/models.py | |
+4 −0 | seosnap/models/__init__.py | |
+18 −0 | seosnap/models/extract_field.py | |
+29 −0 | seosnap/models/page.py | |
+23 −0 | seosnap/models/queue_item.py | |
+33 −0 | seosnap/models/website.py | |
+22 −3 | seosnap/serializers.py | |
+8 −10 | seosnap/templates/admin/seosnap/edit_page.html | |
+15 −0 | seosnap/templates/admin/seosnap/edit_queue.html | |
+3 −0 | seosnap/templates/admin/seosnap/edit_website.html | |
+4 −0 | seosnap/templates/admin/seosnap/view_pages.html | |
+30 −0 | seosnap/templates/admin/seosnap/view_queue.html | |
+8 −0 | seosnap/urls.py | |
+3 −0 | seosnap/views/__init__.py | |
+8 −12 | seosnap/views/page.py | |
+85 −0 | seosnap/views/queue.py | |
+9 −0 | seosnap/views/website.py | |
+3 −1 | seosnap_dashboard/settings.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/bin/bash | ||
|
||
|
||
|
||
git pull origin master --recurse-submodules |