-
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 #10 from experius/develop
Release 0.3.0
- Loading branch information
Showing
11 changed files
with
129 additions
and
92 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
# A hack. Since docker compose wont override this for some reason |
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ RENDERTRON_CACHE_RESOURCE_METHOD=GET | |
RENDERTRON_CACHE_HEADER_REQUEST_BLACKLIST= | ||
RENDERTRON_CACHE_HEADER_RESPONSE_BLACKLIST=Set-Cookie,Content-Encoding,Transfer-Encoding | ||
|
||
API_URL=http://dashboard:8080/docs/ | ||
API_URL=http://dashboard:80/docs/ | ||
API_VER=v1 | ||
API_NAME=snaptron | ||
API_PASS=Sn@ptron1337 | ||
|
@@ -24,12 +24,12 @@ EXTERNAL_CACHE_SERVER_URL= | |
DB_ROOT_HOST=% | ||
DB_HOST=db | ||
DB_NAME=seosnap_dashboard | ||
DB_USER=snaptron | ||
DB_PASS=snaptron | ||
DB_USER=snaptron_db | ||
DB_PASS=snaptron_db | ||
|
||
ADMIN_EMAIL=[email protected] | ||
ADMIN_NAME=snaptron | ||
ADMIN_PASS=Sn@ptron1337 | ||
ADMIN_SECRET="https://miniwebtool.com/django-secret-key-generator/" | ||
ADMIN_DEBUG=1 | ||
ADMIN_LOG_LEVEL=ERROR | ||
ADMIN_LOG_LEVEL=ERROR |
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!make | ||
DC_CONFIGS = -f docker-compose.yml -f seosnap-cacheserver/docker-compose.yml -f seosnap-cachewarmer/docker-compose.yml -f seosnap-dashboard/docker-compose.yml | ||
DC_CONFIGS_DEV = -f docker-compose.yml -f seosnap-cacheserver/docker-compose.dev.yml -f seosnap-cachewarmer/docker-compose.dev.yml -f seosnap-dashboard/docker-compose.dev.yml | ||
|
||
|
||
up: | ||
docker-compose ${DC_CONFIGS} -f docker-compose.yml up | ||
|
||
daemon: | ||
docker-compose ${DC_CONFIGS} -f docker-compose.yml up -d | ||
|
||
build: | ||
docker-compose ${DC_CONFIGS} -f docker-compose.yml build | ||
|
||
dc: | ||
docker-compose ${DC_CONFIGS} -f docker-compose.yml ${A} | ||
|
||
warm: | ||
docker-compose ${DC_CONFIGS} -f docker-compose.yml run cachewarmer ${A} | ||
|
||
install: | ||
echo 'Running installation' | ||
cp .env.example .env | ||
sh seosnap-dashboard/dev/commands/install.sh | ||
|
||
update: | ||
git submodule update --init --recursive | ||
git submodule foreach --recursive git fetch origin master | ||
git submodule foreach --recursive git checkout master | ||
echo "Everything is now up to date" | ||
|
||
develop: | ||
git submodule update --init --recursive | ||
git submodule foreach --recursive git fetch origin develop | ||
git submodule foreach --recursive git checkout develop | ||
echo "Everything is now up to date" |
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 |
---|---|---|
|
@@ -4,14 +4,13 @@ Setup for the whole seosnap stack including dashboard, cache server and cache wa | |
page caching PWA's. | ||
|
||
# Installation | ||
* Pull the repo (*note: the pull is recursive*) | ||
``` | ||
# Clone | ||
git clone --recursive [email protected]:experius/SeoSnap.git | ||
``` | ||
* **IMPORTANT** Update .env file admin username and password. (These have a value default value) | ||
* Start, build and stop the container | ||
``` | ||
docker-compose up --build -d && docker-compose down | ||
# Configure | ||
make install | ||
# Start server | ||
make up | ||
``` | ||
|
||
# Usage | ||
|
@@ -27,7 +26,8 @@ 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 cache <website id> | ||
make cachewarmer | ||
make warm A="cache <website id>" | ||
``` | ||
|
||
## Nginx | ||
|
@@ -78,11 +78,11 @@ Options: | |
### Examples | ||
``` | ||
# Cache the sitemap of website 1 | ||
docker-compose run cachewarmer cache 1 | ||
make warm A="cache 1" | ||
# Cache requests in queue for websites 1 and 2 | ||
dc run cachewarmer cache 1,2 use_queue=true | ||
make warm A="cache 1,2 use_queue=true" | ||
# Clean the queue for websites 1 and 2 | ||
docker-compose run cachewarmer clean 1,2 | ||
make warm A="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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
version: '3.7' | ||
services: | ||
dashboard: | ||
build: | ||
context: seosnap-dashboard | ||
container_name: seosnap_stack_dashboard | ||
env_file: .env | ||
volumes: | ||
- ./seosnap-dashboard:/code | ||
- ./logs:/code/logs | ||
networks: | ||
- seosnap | ||
|
||
cachewarmer: | ||
build: | ||
context: seosnap-cachewarmer | ||
container_name: seosnap_stack_cachewarmer | ||
env_file: .env | ||
volumes: | ||
- ./seosnap-cachewarmer:/code | ||
- ./logs:/code/logs | ||
depends_on: | ||
- dashboard | ||
- cacheserver | ||
networks: | ||
- seosnap | ||
|
||
cacheserver: | ||
build: | ||
context: seosnap-cacheserver | ||
container_name: seosnap_stack_cacheserver | ||
env_file: .env | ||
volumes: | ||
- ./cache:/app/cache | ||
- ./logs:/app/logs | ||
depends_on: | ||
- rendertron | ||
networks: | ||
- seosnap | ||
|
||
rendertron: | ||
container_name: snapstack_rendertron | ||
networks: | ||
- seosnap | ||
|
||
db: | ||
container_name: seosnap_stack_db | ||
volumes: | ||
- ./dev/instance/mariadb:/var/lib/mysql | ||
networks: | ||
- seosnap | ||
|
||
networks: | ||
seosnap: | ||
driver: bridge |
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
+10 −0 | Makefile | |
+7 −0 | docker-compose.dev.yml | |
+21 −12 | docker-compose.yml | |
+3 −0 | rendertron-config.json |
Submodule seosnap-cachewarmer
updated
4 files
+2 −1 | .dockerignore | |
+9 −0 | Makefile | |
+5 −0 | docker-compose.dev.yml | |
+15 −4 | docker-compose.yml |
Submodule seosnap-dashboard
updated
22 files
+2 −1 | .dockerignore | |
+1 −1 | .env.example | |
+13 −3 | Dockerfile | |
+48 −0 | Makefile | |
+8 −4 | README.md | |
+8 −0 | dev/commands/create_admin.sh | |
+15 −0 | dev/commands/install.sh | |
+6 −0 | dev/commands/wait-for-db.sh | |
+182 −0 | dev/commands/wait-for-it.sh | |
+12 −0 | docker-compose.dev.yml | |
+21 −6 | docker-compose.yml | |
+3 −3 | requirements.txt | |
+4 −0 | requirements_dev.txt | |
+6 −3 | seosnap/admin/base.py | |
+27 −14 | seosnap/admin/website.py | |
+0 −29 | seosnap/helpers/permissons.py | |
+36 −0 | seosnap/migrations/0004_create_groups.py | |
+1 −0 | seosnap/models/__init__.py | |
+8 −0 | seosnap/models/signals.py | |
+1 −1 | seosnap/urls.py | |
+1 −1 | seosnap_dashboard/settings.py | |
+0 −13 | setup.sh |