Updates readme

This commit is contained in:
Oleg Silkin 2019-07-30 01:57:29 -04:00
parent c3a4eef9ee
commit c38dfe2530
2 changed files with 27 additions and 20 deletions

View file

@ -4,22 +4,17 @@ This is the code for the LBRY Comment Server.
Fork it, run it, set it on fire. Up to you. Fork it, run it, set it on fire. Up to you.
## Prerequisites ## Before Installing
In order to run the comment server properly, you will need the
following: 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 ## Installation
Installing the server: #### Installing the server:
```bash ```bash
$ git clone https://github.com/osilkin98/comment-server $ git clone https://github.com/osilkin98/comment-server
@ -31,22 +26,34 @@ $ virtualenv --python=python3 venv
# Enter the virtual environment # Enter the virtual environment
$ source venv/bin/activate $ source venv/bin/activate
# install the library dependencies # install the Server as a Executable Target
(venv) $ pip install -r requirements.txt (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 ## Usage
### Running the Server ### Running the Server
To start the server, simply run: To start the server, simply run:
```bash ```bash
# to enter server's venv $ sudo systemctl start comment-server.target
$ source venv/bin/activate
# To start server as daemon process
(venv) $ python -m main &
``` ```
(Optional) Enable the server to run on booting:
```bash
$ sudo systemctl enable --now comment-server.target
```
### Testing ### Testing
To Test the database, simply run: To Test the database, simply run:

View file

@ -5,7 +5,7 @@ ROOT = os.path.dirname(__name__)
setup( setup(
name='CommentServer', name='CommentServer',
version='0.0.1', version='0.0.2',
packages=find_packages(exclude=('tests',)), packages=find_packages(exclude=('tests',)),
entry_points={ entry_points={
'console_scripts': 'commentserv=src.main:main' 'console_scripts': 'commentserv=src.main:main'