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

https://github.com/mathisburger/sporty-leaderboards

An open source workout leaderboard for the private use
https://github.com/mathisburger/sporty-leaderboards

docker docker-compose flutter mobile-development react rust sports-stats

Last synced: 7 months ago
JSON representation

An open source workout leaderboard for the private use

Awesome Lists containing this project

README

          


Sporty Leaderboards





An open source workout leaderboard for the private use.




 







# Idea



I had the idea for this project, because I wanted to monitor my own workouts
and compare them with my friends workout.
I also wanted to learn new technologies like React and Rust.

# Installation



**NOTE: You need docker and docker-compose installed on your machine to run the app**

Now you need to setup your ``docker-compose.yml``.

Create a file named ``docker-compose.yml`` and paste the content of the
sample file.

Now you need to download and start the docker images:
```
docker-compose up
```

If ``backend_1`` logs outputs like ``PoolTimedOut`` the MySQL server failed to
init and you have to do this manually.

To set up the MySQL server manually follow following instructions:

Stop the running containers by pressing ``STRG + C``.

Now you need to start the container in detached mode, because you need to
access the MySQL server.
```
docker-compose up -d
```

You need the containerID of the MySQL container.
```
docker ps -a
```
Copy the containerID of the MySQL container.

To access the container type:
```
docker exec -it /bin/bash
```

Now you will be redirected to the bash terminal of the MySQL container.
Open MySQL terminal my typing:
```
mysql
```

Now you got redirected into the MySQL terminal.
First you need to reset create a new user, with access from every host:
```mysql
CREATE USER ''@'%' IDENTIFIED BY '';
```
Create the database:
```mysql
CREATE DATABASE 'sporty-leaderboards';
```
Grant all privileges on database to user (username is the name of the created user):
```mysql
GRANT ALL PRIVILEGES ON `sporty-leaderboards`.* TO ''@'%';
```

Now you need to change your ``docker-compose.yml``.

Change ``DATABASE_URL`` to ``mysql://:@db:3306/sporty-leaderboards``

```` is the username of your user and ```` the password.

Now you need to restart your docker containers.
```
docker-compose restart -d
```

# User setup



Now you can try to open ``http://MASCHINE_IP:APPLICATION_PORT`` in your browser.

It should look like this:



Now you need to setup the default user. Process the registration on
the webpanel.

After that go back into mysql bash and type:

```mysql
UPDATE `sporty-leaderboards`.`user_accounts` SET `status`='1' WHERE `username`='';
```

Now your installation is completely installed.