Skip to content

Commit

Permalink
Merge branch 'support/cicd' into 'develop'
Browse files Browse the repository at this point in the history
Installation fixes and CI/CD

See merge request PBSA/PeerplaysIO/bos/CouchPotato/python-cp-gui!15
  • Loading branch information
bobinson committed May 13, 2021
2 parents c48a785 + 6264f0e commit 6f1efe2
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 22 deletions.
10 changes: 10 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,20 @@ gemnasium-python-dependency_scanning:

stages:
- test
- deploy

test:
stage: test
script:
- 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
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,36 @@

The project is a web based implementation of couch potato.

## Requirements
- Python 3
- 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

```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
Expand All @@ -26,7 +40,9 @@ cd couchpotato/scripts/
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
Expand Down
37 changes: 37 additions & 0 deletions couchpotato/example-config-bos-mint.yaml
Original file line number Diff line number Diff line change
@@ -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:
- ''
9 changes: 9 additions & 0 deletions couchpotato/uwsgi.ini
Original file line number Diff line number Diff line change
@@ -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
35 changes: 18 additions & 17 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
django-sslserver
bookiesports
bos-mint
bos-incidents
django-sslserver

aiohttp==3.7.4
appdirs==1.4.4
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit 6f1efe2

Please sign in to comment.