Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flofriday/2gplus
Simple service for enforcing 2g+ rules at private gatherings
https://github.com/flofriday/2gplus
Last synced: 1 day ago
JSON representation
Simple service for enforcing 2g+ rules at private gatherings
- Host: GitHub
- URL: https://github.com/flofriday/2gplus
- Owner: flofriday
- License: mit
- Created: 2021-12-11T22:05:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-23T18:20:26.000Z (almost 3 years ago)
- Last Synced: 2023-03-05T01:47:53.904Z (almost 2 years ago)
- Language: Python
- Size: 3.55 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 2gPlus
Simple service for enforcing 2g+ rules at private gatherings
![out](https://user-images.githubusercontent.com/21206831/145721719-e731c3fd-f414-4449-b146-a047b163f795.png)# Getting started
Install Python3.8 (or higher), zbar, popper
Install all dependencies with:
```bash
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
export FLASK_APP=twogplus FLASK_ENV=development
flask run
```This launces a simple webserver which can only be accessed from the localhost.
**Note:** Don't use this server in production, it is insecure and low
performance.## Deployment
How we deploy this app on Ubuntu.
Set the correct timezone with (e.g. Europe/Vienna):
```bash
sudo timedatectl set-timezone TIMEZONE
```Install the requirements with:
```bash
sudo apt -y install python3-venv python3-pip libzbar0 libxml2-dev libxmlsec1-dev libxmlsec1-openssl poppler-utils
```Create a virtual env and install all python dependencies:
```bash
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```Copy `instance/config_example.toml` to `instance/config.toml` and edit all
the fields in it.Open `twogplus.service` and edit the username and all paths to the working
directory.Start the systemd service with:
```bash
sudo cp twogplus.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable twogplus.service
sudo systemctl start twogplus.service
```The service should now be up and running 🎉
To stop the service run:
```bash
sudo systemctl stop twogplus.service
```To update the service to a new version (commit) run:
```bash
git pull
sudo systemctl restart twogplus.service
```