Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/MahjongRepository/mahjong-portal

Portal for russian riichi mahjong community
https://github.com/MahjongRepository/mahjong-portal

django hacktoberfest leaderboard mahjong python tournament

Last synced: 3 months ago
JSON representation

Portal for russian riichi mahjong community

Lists

README

        

The project is working with Python **3.6+** only.

It is web-application to accumulate, calculate and display russian riichi-mahjong tournaments and ratings.

## Local

### Project set up

You need to have installed docker and docker compose.

Steps to run the project:

1. `make build-docker`
2. `make initial-data` (run this command only once, for the initial project setup)
3. `make up`

After these steps you will be able to access website here: http://0.0.0.0:8060/

## Production

### Docker set up

You need to have installed docker and docker compose.

Copy `.envs/.production.env.example` file and fill it with real data, but don't forget to keep it in secret (at least don't add it to version control system). Assign these env variables to the container with any way that is suits you (there are different options how to do it), and after that you can simply run `make build` and `make up` commands. By default in `production.yml` we are using `.envs/.production.env` file.

For static files serving and SSL configuration you need to set up the server upfront of this docker image.

If needed, restore the database backup for the new installation.

### DB Backups

On your host machine you can set up these cron commands to make backups:

```
# every 6 hours
0 */6 * * * cd /root/portal/ && make db-backup backup_type=hourly && /root/upload_files.sh
# once a week
0 0 * * 0 cd /root/portal/ && make db-backup backup_type=weekly && /root/upload_files.sh
# once a month
0 0 2 * * cd /root/portal/ && make db-backup backup_type=monthly && /root/upload_files.sh
```