Installation
The project is used to spin up docker game servers.
You require both python 3 and pip installed to run this command.
To install: pip install lsquery
Once installed you should be able to run it as a python module: python3 -m lsquery
Requirements
These requirements should automatically be installed by pip, but incase they aren't you can run this command.
pip install asyncio==3.4.3 docker==6.1.3 opengsq~=1.4.3 python-decouple~=3.6 pytz~=2022.6 rcon~=2.1.1 websocket-client==1.4.2 websockets~=10.4
Configuration
The project depends on three environment variables. A sample environment file has been provided.
env.example
DOCKER_HOST=
WEBSOCKET_HOST=
WEBSOCKET_APP_KEY=
When you first run the module, it will check if these environment variables have been set. If not, it will prompt the user for each value. If the system detects a default value, it will suggest using it.
If you ever want to reconfigure these values, you can run: python3 -m lsquery -c
| Environment Variable | Description | Sample Values |
|---|---|---|
| DOCKER_HOST | Docker Host | unix:///var/run/docker.sock tcp://192.168.1.11:2376 |
| WEBSOCKET_HOST | Websocket Host | portal.lanslide.com.au |
| WEBSOCKET_APP_KEY | Websocket Application Key | - |
Post Installation
You may want to consider running this package as a service. Here is a sample portal.service script
Note: screen must be installed.
/etc/systemd/system/portal.service
[Unit]
Description=Portal Service
After=multi-user.target
[Service]
Type=forking
Restart=on-failure
ExecStart=/usr/bin/screen -L -dmS portal /usr/bin/python3 -m lsquery
ExecStop=/usr/bin/screen -X -S portal quit
[Install]
WantedBy=multi-user.target
To enable this service on start up you can run
systemctl enable portal
To start this service you can run
systemctl start portal
Metadata
Release files for lsquery 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lsquery-0.1.7.tar.gz | 23.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lsquery-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.9 kB
Release files / lsquery-0.1.7.tar.gz
| Download URL | lsquery-0.1.7.tar.gz |
|---|---|
| Size | 23.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62d87c118e2ac457a97b7e08b2305373794ea907bf68dadabcee10f762eddcc4
|
|
BLAKE2b-256 checksum How to use checksums |
5ff779e561683a232e3580ebf0babc2ab86fb77c0778fe17edfd7ec7ce5aa370
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.4
|
Release files / lsquery-0.1.7-py3-none-any.whl
| Download URL | lsquery-0.1.7-py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5a8807a3e63974d6930bb5d1f17d1bc1031445d61489ef7fd39bdcec083d4e1
|
|
BLAKE2b-256 checksum How to use checksums |
494b6deca894e98e147e60e501fafd5bb0ebdcb1f375baa4acb7ff19b5ed7709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.4
|