Coder Social home page Coder Social logo

gulag's Introduction

# clone bancho.py's repository
git clone https://github.com/10pc/gulag && cd gulag

# clone bancho.py's dependencies' repositories
git submodule update --init
sudo add-apt-repository ppa:deadsnakes

# install required programs for running bancho.py
sudo apt install python3.9-dev python3.9-distutils \
                 cmake build-essential \
                 mysql-server redis-server \
                 nginx certbot

# install python's package manager, pip
wget https://bootstrap.pypa.io/get-pip.py
python3.9 get-pip.py && rm get-pip.py

# make sure pip and setuptools are up to date
python3.9 -m pip install -U pip setuptools

# install bancho.py's python-specific dependencies
python3.9 -m pip install -r requirements.txt
# login to mysql's shell with root - the default admin account
mysql -u root -p
# create a database for bancho.py to use
CREATE DATABASE YOUR_DB_NAME;

# create a user to use the bancho.py database
CREATE USER 'YOUR_DB_USER'@'localhost' IDENTIFIED BY 'YOUR_DB_PASSWORD';

# grant the user full access to all tables in the bancho.py database
GRANT ALL PRIVILEGES ON YOUR_DB_NAME.* TO 'YOUR_DB_USER'@'localhost';

# make sure privilege changes are applied immediately.
FLUSH PRIVILEGES;

# exit the mysql shell, back to bash
quit
# import bancho.py's mysql structure to our new db
mysql -u YOUR_DB_USER -p YOUR_DB_NAME < migrations/base.sql
# copy the example nginx config and make a symbolic link
sudo cp ext/nginx.conf /etc/nginx/sites-available/bancho.conf
sudo ln -s /etc/nginx/sites-available/bancho.conf /etc/nginx/sites-enabled/bancho.conf

# now, you can edit the config file.
# the spots you'll need to change are marked.
sudo nano /etc/nginx/sites-available/bancho.conf

# reload config from disk
sudo nginx -s reload
# create a configuration file from the sample provided
cp .env.example .env

# you'll want to configure *at least* DB_DSN (the database connection url),
# as well as set the OSU_API_KEY if you need any info from osu!'s v1 api
# (e.g. beatmaps).

# open the configuration file for editing
nano .env
# start the server
./main.py

tada

gulag's People

Contributors

cmyui avatar tsunyoku avatar pre-commit-ci[bot] avatar kaupec1 avatar lkse avatar 10pc avatar minisbett avatar def750 avatar 7ez avatar alowave223 avatar yo-ru avatar memsdm05 avatar jkbgl avatar airiuwu avatar timestwo avatar gamerboy80 avatar sensokaku avatar pure-peace avatar ledlamp avatar skrungly avatar faithy3 avatar hedgehog-qd avatar atakku avatar aipnoobest avatar atl128 avatar beyley avatar babyoumine avatar airkek avatar varkaria avatar realistikdash avatar

Stargazers

Joachim avatar

Watchers

 avatar

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.