Skip to main content

The project is used to spin up docker game servers

Project description

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.0.1 opengsq~=1.4.3 python-decouple~=3.6 pytz~=2022.6 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lsquery-0.1.2.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

lsquery-0.1.2-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file lsquery-0.1.2.tar.gz.

File metadata

  • Download URL: lsquery-0.1.2.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for lsquery-0.1.2.tar.gz
Algorithm Hash digest
SHA256 45ff7b3c7e0cda64f04373e7001c3eab0280d3068180b5169e2a9bed4fab0796
MD5 af2648394dc51ca52ae5d5582603c56d
BLAKE2b-256 a1dfa5de4087f7c8323123c6799d12710b410d908ab0ca3f7ef6c5d310423c87

See more details on using hashes here.

File details

Details for the file lsquery-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: lsquery-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for lsquery-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da3a5b5d2522b1d2928ef3e9fede68b22c95ac596b45f3ba4b73239d35df4c9b
MD5 c5068ddbef30a03f8aef646e20681d82
BLAKE2b-256 cd57339111a9da7bb094b107a6d196a3ce9c6234335ba5a157a311281ca1f20a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page