mirror of
https://github.com/arcan1s/ffxivbis.git
synced 2025-04-25 09:47:18 +00:00
update readme and reference.conf
This commit is contained in:
parent
e9d5d8c363
commit
6730db7e19
84
README.md
84
README.md
@ -4,98 +4,22 @@ Service which allows to manage savage loot distribution easy.
|
|||||||
|
|
||||||
## Installation and usage
|
## Installation and usage
|
||||||
|
|
||||||
This service requires python >= 3.7. For other dependencies see `setup.py`.
|
|
||||||
|
|
||||||
In general installation process looks like:
|
In general installation process looks like:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python setup.py build install
|
sbt assembly
|
||||||
python setup.py test # if you want to run tests
|
|
||||||
```
|
```
|
||||||
|
|
||||||
With virtualenv (make sure that virtualenv package was installed) the process may look like:
|
Service can be run by using command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
virtualenv -p python3.7 env
|
java -cp ./target/scala-2.13/ffxivbis-scala-assembly-0.1.jar me.arcanis.ffxivbis.ffxivbis
|
||||||
source env/bin/activate
|
|
||||||
python setup.py install
|
|
||||||
pip install aiosqlite # setup.py does not handle extras
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Service can be run by using command (if you don't use virtualenv, you have to run it from `src` directory):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
python -m ffxivbis.application.application
|
|
||||||
```
|
|
||||||
|
|
||||||
To see all available options type `--help`.
|
|
||||||
|
|
||||||
## Web service
|
## Web service
|
||||||
|
|
||||||
REST API documentation is available at `http://0.0.0.0:8000/api-docs`. HTML representation is available at `http://0.0.0.0:8000`.
|
REST API documentation is available at `http://0.0.0.0:8000/swagger`. HTML representation is available at `http://0.0.0.0:8000`.
|
||||||
|
|
||||||
*Note*: host and port depend on configuration settings.
|
*Note*: host and port depend on configuration settings.
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
Default admin user is `admin:qwerty`, but it may be changed by generating new hash, e.g.:
|
|
||||||
|
|
||||||
```python
|
|
||||||
from passlib.hash import md5_crypt
|
|
||||||
md5_crypt.hash('newstrongpassword')
|
|
||||||
```
|
|
||||||
|
|
||||||
and add new password to configuration.
|
and add new password to configuration.
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
* `settings` section
|
|
||||||
|
|
||||||
General project settings.
|
|
||||||
|
|
||||||
* `include`: path to include configuration directory, string, optional.
|
|
||||||
* `logging`: path to logging configuration, see `logging.ini` for reference, string, optional.
|
|
||||||
* `database`: database provide name, string, required. Allowed values: `sqlite`, `postgres`.
|
|
||||||
* `priority`: methods of `Player` class which will be called to sort players for loot priority, space separated list of strings, required.
|
|
||||||
|
|
||||||
* `ariyala` section
|
|
||||||
|
|
||||||
Settings related to ariyala parser.
|
|
||||||
|
|
||||||
* `ariyala_url`: ariyala base url, string, required.
|
|
||||||
* `xivapi_key`: xivapi developer key, string, optional.
|
|
||||||
* `xivapi_url`: xivapi base url, string, required.
|
|
||||||
|
|
||||||
* `auth` section
|
|
||||||
|
|
||||||
Authentication settings.
|
|
||||||
|
|
||||||
* `enabled`: whether authentication enabled or not, boolean, required.
|
|
||||||
* `root_username`: username of administrator, string, required.
|
|
||||||
* `root_password`: md5 hashed password of administrator, string, required.
|
|
||||||
|
|
||||||
* `postgres` section
|
|
||||||
|
|
||||||
Database settings for `postgres` provider.
|
|
||||||
|
|
||||||
* `database`: database name, string, required.
|
|
||||||
* `host`: database host, string, required.
|
|
||||||
* `password`: database password, string, required.
|
|
||||||
* `port`: database port, int, required.
|
|
||||||
* `username`: database username, string, required.
|
|
||||||
* `migrations_path`: path to database migrations, string, required.
|
|
||||||
|
|
||||||
* `sqlite` section
|
|
||||||
|
|
||||||
Database settings for `sqlite` provider.
|
|
||||||
|
|
||||||
* `database_path`: path to sqlite database, string, required.
|
|
||||||
* `migrations_path`: path to database migrations, string, required.
|
|
||||||
|
|
||||||
* `web` section
|
|
||||||
|
|
||||||
Web server related settings.
|
|
||||||
|
|
||||||
* `host`: address to bind, string, required.
|
|
||||||
* `port`: port to bind, int, required.
|
|
||||||
* `templates`: path to directory with jinja templates, string, required.
|
|
@ -1,16 +1,22 @@
|
|||||||
me.arcanis.ffxivbis {
|
me.arcanis.ffxivbis {
|
||||||
ariyala {
|
ariyala {
|
||||||
|
// ariyala base url, string, required
|
||||||
ariyala-url = "https://ffxiv.ariyala.com"
|
ariyala-url = "https://ffxiv.ariyala.com"
|
||||||
|
// xivapi base url, string, required
|
||||||
xivapi-url = "https://xivapi.com"
|
xivapi-url = "https://xivapi.com"
|
||||||
|
// xivapi developer key, string, optional
|
||||||
|
# xivapi-key = "abc-def"
|
||||||
}
|
}
|
||||||
|
|
||||||
database {
|
database {
|
||||||
|
// database section. Section must be declared inside
|
||||||
|
// for more detailed section descriptions refer to slick documentation
|
||||||
mode = "sqlite"
|
mode = "sqlite"
|
||||||
|
|
||||||
sqlite {
|
sqlite {
|
||||||
profile = "slick.jdbc.SQLiteProfile$"
|
profile = "slick.jdbc.SQLiteProfile$"
|
||||||
db {
|
db {
|
||||||
url = "jdbc:sqlite:/home/arcanis/Documents/github/ffxivbis-scala/ffxivbis.db"
|
url = "jdbc:sqlite:ffxivbis.db"
|
||||||
user = "user"
|
user = "user"
|
||||||
password = "password"
|
password = "password"
|
||||||
}
|
}
|
||||||
@ -19,14 +25,19 @@ me.arcanis.ffxivbis {
|
|||||||
}
|
}
|
||||||
|
|
||||||
settings {
|
settings {
|
||||||
|
// counters of Player class which will be called to sort players for loot priority
|
||||||
|
// list of strings, required
|
||||||
priority = [
|
priority = [
|
||||||
"isRequired", "lootCountBiS", "priority", "lootCount", "lootCountTotal"
|
"isRequired", "lootCountBiS", "priority", "lootCount", "lootCountTotal"
|
||||||
]
|
]
|
||||||
|
// general request timeout, duratin, required
|
||||||
request-timeout = 10s
|
request-timeout = 10s
|
||||||
}
|
}
|
||||||
|
|
||||||
web {
|
web {
|
||||||
|
// address to bind, string, required
|
||||||
host = "0.0.0.0"
|
host = "0.0.0.0"
|
||||||
|
// port to bind, int, required
|
||||||
port = 8000
|
port = 8000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user