Geoffrey Setup¶
Requirements¶
Versions shown have been tested to work
Setup¶
Note
Geoffrey is a Django application. To install Geoffrey, you need to have a Django site already setup instructions to do that can be found here
Installing GeoffreyApp From Source¶
1. Download Geoffrey by cloning it
git clone https://git.etztech.xyz/ZeroHD/Geoffrey.git GeoffreyApp
2. Change directories into GeoffreyApp
cd GeoffreyApp/
3. Install Geoffrey as a module
pip3 install -e .
Integrate Geoffrey Into a Django Project¶
1. In settings.py
add GeoffreyApp
to INSTALLED_APPS
INSTALLED_APPS = [
'GeoffreyApp',
...
2. Once installed, run the migrations to setup the database for the first time
python manage.py makemigrations
python manage.py migrate
3. Then add the URLs to your projects’s urls.py
path('GeoffreyApp/', include('GeoffreyApp.urls')),
Setup Settings¶
To setup your settings.py
for Geoffrey, checkout Django Settings
Enable Username Updates¶
Minecraft usernames in Geoffrey can be updated using the update_mc_username sub-command:
python manage.py update_mc_username
To handle username updates automatically, an external scheduling program should be used. Below is an example of how to do this with a Linux cron job:
#!/bin/bash
PATH_TO_GEOFFREY_MANAGE=/home/geoffrey/django/manage.py
PATH_TO_VENV=/home/geoffrey/venv
source "$PATH_TO_VENV/bin/activate"
python $PATH_TO_GEOFFREY_MANAGE update_mc_username
deactivate
The above script should be placed in the appropriate /etc/cron. directory.