From 2a185367d1a1e05c3f23c97ce1f6e1e5468e5069 Mon Sep 17 00:00:00 2001 From: Roshan Syed Date: Thu, 13 May 2021 11:15:19 -0300 Subject: [PATCH 1/4] ci: added deploy and updated instructions --- .gitlab-ci.yml | 10 ++++++++++ README.md | 17 ++++++++++++----- couchpotato/uwsgi.ini | 9 +++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 couchpotato/uwsgi.ini diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c210439..0e538d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,7 @@ gemnasium-python-dependency_scanning: stages: - test + - deploy test: stage: test @@ -20,3 +21,12 @@ test: - apt-get update -qy - apt-get install -y python3-dev python3-pip build-essential sqlite3 - pip3 install -r requirements.txt + +deployToDev: + stage: deploy + script: + - deployToDev + tags: + - cp1 + only: + - develop \ No newline at end of file diff --git a/README.md b/README.md index a809700..5020efc 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,28 @@ The project is a web based implementation of couch potato. +## Requirements +- Python 3 +- Git +- Virtualenv +- MongoDB + ## Installation -```bash +```bash cd python-cp-gui python3 -m venv env source env/bin/activate pip3 install -r requirements.txt +# Configure config-bos-mint.yaml +cd couchpotato +cp example-config-bos-mint.yaml config-bos-mint-yaml ``` - - ### First Run -Modify config-bos-mint.yaml - ```bash +cd python-cp-gui source env/bin/activate cd couchpotato/scripts/ ./install.sh @@ -26,6 +32,7 @@ cd couchpotato/scripts/ This operation will clear all the existing users ## Usage + ```bash source env/bin/activate cd couchpotato diff --git a/couchpotato/uwsgi.ini b/couchpotato/uwsgi.ini new file mode 100644 index 0000000..ef5c165 --- /dev/null +++ b/couchpotato/uwsgi.ini @@ -0,0 +1,9 @@ +[uwsgi] +module = couchpotato.wsgi:application +master = true +callable = application +processes = 5 +socket = /tmp/cp.sock +chmod-socket = 666 +vacuum = true +die-on-term = true \ No newline at end of file From 768b32f76c9d9ae5009a69ff72248995c8ec1330 Mon Sep 17 00:00:00 2001 From: Roshan Syed Date: Thu, 13 May 2021 11:20:41 -0300 Subject: [PATCH 2/4] chore: added example mint config --- couchpotato/example-config-bos-mint.yaml | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 couchpotato/example-config-bos-mint.yaml diff --git a/couchpotato/example-config-bos-mint.yaml b/couchpotato/example-config-bos-mint.yaml new file mode 100644 index 0000000..197984f --- /dev/null +++ b/couchpotato/example-config-bos-mint.yaml @@ -0,0 +1,37 @@ +debug: FALSE +project_name: PYTHON COUCH POTATO +project_sub_name: The Python Couch Potato project +secret_key: THINK CLOCK SMOG FLAG SMACK TINKER FLUNK # enter any random string +advanced_features: True + +sql_database: "sqlite:///{cwd}/bookied-local.db" + +connection: + use: hercules # enter your desired chain + + hercules: + node: + - wss://hercules.peerplays.download/api + nobroadcast: False + num_retries: 1 + +allowed_assets: + - BTFUN + - PPY + - TEST + - BTF + +potatoNames: + - cpx + - cpy + +bosApis: + - http://hercules.peerplays.download:8010/trigger + +token: + - 1111111 + +token_telegram: '' + +telegram_chat_ids: + - '' \ No newline at end of file From 061a78a1aeed852a091bcd1310959909550a6f19 Mon Sep 17 00:00:00 2001 From: Roshan Syed Date: Thu, 13 May 2021 11:37:21 -0300 Subject: [PATCH 3/4] chore: added telegram to requirements --- requirements.txt | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/requirements.txt b/requirements.txt index 56bffce..5e8b30d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -django-sslserver bookiesports bos-mint bos-incidents +django-sslserver aiohttp==3.7.4 appdirs==1.4.4 @@ -15,25 +15,31 @@ blinker==1.4 bos-sync==0.3.0 certifi==2020.12.5 chardet==3.0.4 -click==7.1.2 click-datetime==0.2 +click==7.1.2 colorlog==4.6.2 +coreapi==2.3.3 +coreschema==0.0.4 dateutils==0.6.12 decorator==4.4.2 +django-rest-swagger==2.2.0 +django-rest-swagger==2.2.0 Django==3.1.6 djangorestframework==3.12.2 dnspython==2.0.0 +drf-yasg==1.20.0 +drf-yasg==1.20.0 ecdsa==0.13.3 email-validator==1.1.2 Events==0.4 expiringdict==1.2.1 -Flask==1.1.2 Flask-Assets==2.0 Flask-Mail==0.9.1 Flask-Markdown==0.3 Flask-Script==2.0.6 Flask-SQLAlchemy==2.4.4 Flask-WTF==0.14.3 +Flask==1.1.2 future==0.18.2 graphenelib==1.0.1 idna==2.8 @@ -49,6 +55,7 @@ MarkupSafe==1.1.1 multidict==5.1.0 mysqlclient numpy==1.19.4 +openapi-codec==1.3.2 pandas parso==0.7.1 peerplays==0.3.0 @@ -57,24 +64,31 @@ pickleshare==0.7.5 prettytable==2.0.0 prompt-toolkit==3.0.8 ptyprocess==0.6.0 +pyasn1==0.4.8 +pycparser==2.20 pycryptodome==3.9.9 Pygments==2.7.4 pylibscrypt==1.8.0 pymongo==3.11.2 +pyparsing==2.4.7 pyrsistent==0.17.3 python-dateutil==2.8.1 pytz==2020.4 PyYAML==5.4 requests==2.22.0 +ruamel.yaml==0.16.12 scrypt==0.8.17 +simplejson==3.17.2 six==1.15.0 SQLAlchemy==1.3.20 sqlparse==0.4.1 strict-rfc3339==0.7 +telegram tqdm==4.54.1 traitlets treelib==1.6.1 typing-extensions==3.7.4.3 +uritemplate urllib3==1.24.3 uWSGI wcwidth==0.2.5 @@ -84,17 +98,4 @@ websockets==8.1 Werkzeug==1.0.1 WTForms==2.3.3 yarl==1.6.3 -zipp==3.4.0 -uritemplate -django-rest-swagger==2.2.0 -drf-yasg==1.20.0 -django-rest-swagger==2.2.0 -drf-yasg==1.20.0 -openapi-codec==1.3.2 -coreapi==2.3.3 -coreschema==0.0.4 -pyasn1==0.4.8 -pycparser==2.20 -pyparsing==2.4.7 -ruamel.yaml==0.16.12 -simplejson==3.17.2 +zipp==3.4.0 \ No newline at end of file From 6d0d4efcb28d119d95a2c4f4d4797e10ceed21e8 Mon Sep 17 00:00:00 2001 From: Roshan Syed Date: Thu, 13 May 2021 16:14:11 +0000 Subject: [PATCH 4/4] doc: updated install docs --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5020efc..59edcbe 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,17 @@ The project is a web based implementation of couch potato. ## Requirements - Python 3 -- Git - Virtualenv +- GCC +- Git - MongoDB +- SQLite + +### Ubuntu 18+ +```bash +sudo apt-get update +sudo apt-get install python3 python3-venv python3-dev build-essential git mongodb libmysqlclient-dev -y +``` ## Installation @@ -17,7 +25,7 @@ source env/bin/activate pip3 install -r requirements.txt # Configure config-bos-mint.yaml cd couchpotato -cp example-config-bos-mint.yaml config-bos-mint-yaml +cp example-config-bos-mint.yaml config-bos-mint.yaml ``` ### First Run @@ -34,6 +42,7 @@ This operation will clear all the existing users ## Usage ```bash +cd python-cp-gui source env/bin/activate cd couchpotato python3 manage.py runserver 0.0.0.0:9010