From c38dfe25305e2d9606c3d7c2775b1d6ae51b2867 Mon Sep 17 00:00:00 2001 From: Oleg Silkin Date: Tue, 30 Jul 2019 01:57:29 -0400 Subject: [PATCH] Updates readme --- README.md | 45 ++++++++++++++++++++++++++------------------- setup.py | 2 +- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index d762742..23f4269 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,17 @@ This is the code for the LBRY Comment Server. Fork it, run it, set it on fire. Up to you. -## Prerequisites -In order to run the comment server properly, you will need the -following: +## Before Installing + +Comment Deletion requires having the [`lbry-sdk`](https://github.com/lbryio/lbry-sdk) +in order to validate & properly delete comments. + + - 0. A Unix Compliant Operating System (e.g: Ubuntu, RedHat, Hannah Montana, etc.) - 1. Any recent version of Sqlite3 - 2. Python 3.6+ (including `python3-dev`, `python3-virtualenv`, `python3-pip`) - Note: You must specify the specific python version you're using, - e.g. for Python3.6, you would install `python36-dev`. You're smart enough to figure the rest out from here ;) - 3. (Optional) Reverse Proxy software to handle a public-facing API. - We recommend Caddy, though there is an `nginx.conf` file under `config`. - 5. Patience (Strongly recommended but often neglected) ## Installation -Installing the server: +#### Installing the server: ```bash $ git clone https://github.com/osilkin98/comment-server @@ -31,22 +26,34 @@ $ virtualenv --python=python3 venv # Enter the virtual environment $ source venv/bin/activate -# install the library dependencies -(venv) $ pip install -r requirements.txt +# install the Server as a Executable Target +(venv) $ python setup.py develop ``` +### Installing the systemd Service Monitor + +As a super-user, copy the .service and .target files to the systemd directory: +```bash +$ sudo comment-server/config/comment-server* /etc/systemd/system +``` +Then `$ sudo systemctl daemon-reload` to refresh the systemd service files. + + + ## Usage ### Running the Server To start the server, simply run: ```bash -# to enter server's venv -$ source venv/bin/activate - -# To start server as daemon process -(venv) $ python -m main & +$ sudo systemctl start comment-server.target ``` +(Optional) Enable the server to run on booting: +```bash +$ sudo systemctl enable --now comment-server.target +``` + + ### Testing To Test the database, simply run: diff --git a/setup.py b/setup.py index 8f5d57d..f7397f8 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ ROOT = os.path.dirname(__name__) setup( name='CommentServer', - version='0.0.1', + version='0.0.2', packages=find_packages(exclude=('tests',)), entry_points={ 'console_scripts': 'commentserv=src.main:main'