Coder Social home page Coder Social logo

alfg / guildbit Goto Github PK

View Code? Open in Web Editor NEW
56.0 7.0 8.0 3.99 MB

:sound: Mumble Hosting Platform

Home Page: https://guildbit.com

Python 30.23% CSS 10.37% JavaScript 5.50% HTML 52.51% Shell 0.49% DIGITAL Command Language 0.43% Mako 0.17% Dockerfile 0.31%
mumble-servers python mumble voip murmur

guildbit's Introduction

GuildBit.com

Free Mumble Hosting

Guildbit.com

GuildBit is a full-stack application written in Python to offer temporary virtual Mumble servers to users. Guildbit depends on murmur-rest API backend to interface with the virtual Mumble servers.

https://guildbit.com

Screenshots

Guildbit.com Home Guildbit.com Server

Technology Stack

Development

It is highly recommended to use Docker to setup your environment. A docker-compose.yml is provided as a typical setup for the following services:

  • Guildbit App
  • Celery - Task scheduler.
  • Flower - Celery Dashboard UI
  • NGINX - optional reverse proxy
  • Redis Server - key/value storage for caching and message broker
  • murmur-rest - Murmur HTTP API
  • murmurd - Mumble Server

If using Docker, scroll down to Docker Setup

Requirements

Please note murmur-rest MUST be setup in order to deploy virtual Mumble servers. However, it is possible to work on the Guildbit app without murmur-rest, you just won't be able to deploy or administer any Mumble servers.

$ git clone https://github.com/alfg/guildbit
$ virtualenv env --system-site-packages
$ . env/bin/activate
$ pip install -r requirements.txt
$ export FLASK_ENV=development
$ export FLASK_RUN_HOST=0.0.0.0
$ export FLASK_RUN_PORT=5000
$ flask run

* Running on http://0.0.0.0:5000/
* Restarting with reloader
  • Database and schema will automatically be created via Flask-Migrate.
  • Development server is running with default settings. See Configuration Guide for additional configuration options.
  • Run celery in a separate process (but in the same python environment) to start the messaging queue:
    $ celery worker --app=app.tasks -l info
    

Docker

A Dockerfile and docker-compose.yml is provided for setting up a local development server. This will startup and link all services needed to run Guildbit:

$ docker-compose build
$ docker-compose up

Starting guildbit_redis_1   ... done
Starting guildbit_murmurd_1 ... done
Starting guildbit_db_1      ... done
Starting guildbit_flower_1  ... done
Starting guildbit_murmur-rest_1 ... done
Starting guildbit_guildbit_1    ... done
Starting guildbit_guildbit-tasks_1  ... done
Starting guildbit_nginx_1       ... done

guildbit_1 | [1] [INFO] Starting gunicorn 19.5.0
guildbit_1 | [1] [INFO] Listening at: http://0.0.0.0:8081 (1)
guildbit_1 | [1] [INFO] Using worker: sync
guildbit_1 | [9] [INFO] Booting worker with pid: 9

Or run flask run via Docker for active devleopment with a local volume mounted:

λ docker-compose run --service-ports guildbit bash
Starting guildbit_db_1      ... done
Starting guildbit_redis_1   ... done
Starting guildbit_murmurd_1 ... done
Starting guildbit_murmur-rest_1 ... done
Creating guildbit_guildbit_run  ... done
root@dbf0add00eec:/opt/guildbit# . venv/bin/activate
(venv) root@dbf0add00eec:/opt/guildbit# flask run
 * Serving Flask app "app" (lazy loading)
 * Environment: development
 * Debug mode: on
 * Running on http://0.0.0.0:8081/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 212-673-348

The database schema should automatically be created and ready for use.

Load http://localhost:8081 in your browser.

See Configuring Hosts on the wiki for next steps on setting up Hosts to start deploying Mumble servers.

Admin

See: Activating Admin

Translations

Translations are welcome. To add or update a translation, please add a file or update a file in https://github.com/alfg/guildbit/tree/master/app/translations. For more information, please read the wiki.

Resources

License

MIT License © Alfred Gutierrez

guildbit's People

Contributors

alfg avatar bkmgit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

guildbit's Issues

Add caching

Identify areas that should be cached and cache them. We can use flask-cache and redis as a backend.

Some areas to consider:

  • Context processors (such as homepage message)
  • General static views

Also add a section in admin tools to reset cache and reset cache on Cloudflare.

Revisit Install instructions

Please revisit the install instructions.
It is not possible to follow the install instructions.
A lot seems to be missing there.

Auto-refresh the time expiration on server view

Since the page doesn't really refresh itself, the 'expires' field on the server page should auto-update to reflect the proper remaining time.

Also, when time has expired, refresh the page so the 'expired' view is shown.

Update download links.

The current download links still point to the Sourceforge repos. Mumble.info has moved their binaries/releases over to Github.

URL Shortener

It would be nice to have some sort of URL shortener so users can share their server page easier with a smaller url, especially for sharing over a game's chat window.

http://guildbit.com/server/8234cac3-862f-4c30-82fe-f31e4b2b12b0

compared to

http://guildbit.com/FEafe3

It should work like this:
http://code.activestate.com/recipes/576918/

Using the ID as the key to output the generated string.

docker-compose is failing

Hi,

I tried to install it using docker-compose and it is failing with the below error:
I followed the below steps:

 - git clone https://github.com/alfg/guildbit.git
 -  docker-compose build
  -  docker-compose up

[root@test guildbit]# docker --version
Docker version 20.10.6, build 370c289

I am trying to run it locally Please let me know if I need to configure a file or if I missing something else.

reating guildbit_redis_1   ... done
Creating guildbit_murmurd_1 ... done
Creating guildbit_db_1      ... done
Creating guildbit_flower_1      ... error
Creating guildbit_murmur-rest_1 ... 

ERROR: for guildbit_flower_1  Cannot start service flower: b'OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "--app guildbit-tasks": executable fiCreating guildbit_murmur-rest_1 ... done
Creating guildbit_guildbit_1    ... done
Creating guildbit_celery_1      ... done
Creating guildbit_nginx_1       ... done

ERROR: for flower  Cannot start service flower: b'OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "--app guildbit-tasks": executable file not found in $PATH: unknown'
ERROR: Encountered errors while bringing up the project.

Thank you for sharing your project! Please let me know if you need more debugs from me.

[feature request] guildbit API

It would be great to have a guild built API where a user can use an AUTH_TOKEN to start a guildbit server ( giving auth token, serverid, time, password as input ) and get the host, port and other details as json output.

This can be used in various scenarios including discord webhooks. Where if we start a guildbit mumble server, it'll directly post the link on discord.

Colons in password breaks URI launch.

From an email:

It appears that a colon character in the password field can cause issues, because mumble get's confused if it is launched via the mumble:// link. If it isn't possible to somehow escape a character, then maybe colons should be disabled in the textbox.

Need to escape colons in passwords so it doesn't break the uri when launching from browser.

AFK room for free servers

From a feedback suggestion:

Ability to create sub servers [channel] would be very much appreciated. (for things like when people need to afk but they dont want to mute themselves or turn off mumble) this is purley an addition of convenience

Seems like a reasonable request. We would need to build in support for creating channels via https://github.com/alfg/murmur-rest API first, before implementing within Guildbit.

Looking for contributors!

EU Server not creating new virtual mumble servers

A user has reported that he is unable to create a EU server. I see one server created, but I'm unable to create others.

Found this exception in log (not sure why exception didn't report by email).

Traceback (most recent call last):
  File "/srv/guildbit/app/views.py", line 79, in post
    server_id = murmur.create_server_by_location(form.location.data, payload)
  File "/srv/guildbit/app/murmur.py", line 92, in create_server_by_location
    port_check = find_available_port(location)
  File "/srv/guildbit/app/murmur.py", line 267, in find_available_port
    active_ports.append(i["port"])
KeyError: 'port'

GuildBit Logo and favicon

We need a proper logo and favicon. The current logo is decent, but a bit fuzzy and not very unique.

Admin user for first login

From Feedback:

Can the first log in make channels and be admins or when creating server ask for admin user?

Mumble server ports will eventually run out if not maintained

Murmur uses the last port used + 1 to create a new server. This causes an issue where potentially all ports will run out if there's constantly servers running.

server 1 = port 1
server 2 = port 2
server 3 = port 3

If server 2 is destroyed, the next server will be:
server 4 = port 4

So we need some functionality in place to maintain the list of open/active ports and to reuse the next one that becomes available.

Update Auth

Google's OpenID Auth is deprecated. Need to update auth code to work without openid, or with another provider.

Creating 2 servers at the same time issue

Got this error today:

Exception on /server/2bb3e52b-d024-4a7d-9fcd-0102e289086b [GET]
Traceback (most recent call last):
  File "/srv/guildbit/env/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/srv/guildbit/env/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/srv/guildbit/env/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/srv/guildbit/env/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/srv/guildbit/env/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/srv/guildbit/env/local/lib/python2.7/site-packages/flask_classy.py", line 216, in proxy
    response = view(**request.view_args)
  File "/srv/guildbit/app/controllers/server.py", line 19, in get
    server_details = murmur.get_server(server.mumble_host, server.mumble_instance)
  File "/srv/guildbit/app/murmur.py", line 119, in get_server
    r = requests.get("%s/servers/%i" % (uri, instance_id), auth=HTTPDigestAuth(auth['username'],
TypeError: %d format: a number is required, not NoneType

Turns out 2 servers were created at the same time (to the second) which both tried to assign the same port. However, the 2nd server wasn't able to start since the port was reserved already and therefore errored out.

This ends up leaving the 2nd server without a port, not running and unable to shutdown in the admin interface since an exception just occurs when accessing the server page.

Quick fix is to update status to expired via sql and shutdown instance via murmur-rest manually.

Long term fix is to rework the deploy server code a bit to atomically create servers with transactions.

Add copy info button

Add an easy way for users to copy the mumble host url/password/port so they can easily paste it to their friends ingame.

Issue with Translation and Admin

Hi,
First of all, I want to thank you for your awesome project, you did a great job (: .
I have some issues with Translation: My website is in english only, or If I visit guildbit.com, your website appears in French . I tried to add 'fr' : French or Français on setting.py but it doesn't work.

My second problem is how Can I set my steam account as admin ?

Thank you again,
Cheers,
Lumia

[Feature Request] Use BTCPayserver

Hey There!

Just stumbled upon the project today and was really blown away by how cool it is! Hats off to you!

I was thinking of throwing a few Satoshis your way but saw that you were only accepting on-chain bitcoin payments. Whilst easy to do there are a few issues.

Issues

The first is privacy, It's very easy to trace any payments coming in or out of your address, the donations you earn will be forever linked to you.

The second is the on-chain transaction fees, whilst BTC is great for a lot of things, the speed and the transaction fees (especially whilst the mempool is as rammed as it is right now) are not the highlights.

Enhancement

Perhaps something you could look into to fix this issue would be something like this: https://btcpayserver.org/

This way you would be able to change address for every donation you receive, and furthermore, accept payments on the Lightning Network, a fee-less and instant payment system powered by the Bitcoin blockchain.

If you end up going through and setting it up, might chuck 5 or so EUR your way ;)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.