Jump to content

How do you configure wger app on Unraid???


Recommended Posts

Need some assistance and direction on how to get wger configured in apps within my Unraid Server. So far I have concluded that besides getting wger installed I also need to install a back end SQL database program.  At this time I have both wger-unraid app and postgresql15 installed on my Unraid server.

The part that I need assistance with is the configuration set up and what data I need from within postgresql15 app to input into the configuration set up of the wger app.

Ive looked on YouTube as well as general internet searches to see if i can find a how to tutorial before reaching out for help on the Unraid Forum. I have concluded that the following fields are mandatory for getting wger installed.

DJANGO_DB_HOST:

SITE_URL:

SECRET_KEY:

image.png.65ddccf05ddd5e38e3a520a4abc066fe.png

 

Anyone on here have experience with this setup? Or have a how to for this set up?

 

 

Link to comment
  • 3 months later...

Sorry I can't help, but did you manage to find an answer? New year, new workout goals and I'm trying to get wger to work, with absolutely no success.

I created a database in my mariaDB container, plugged all the details into the wger container, and keep getting the error, "django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module."

I've tried different ports, the same as my other containers, but still no luck at all

Edited by extinct_waffle
Link to comment

Sorry to hichjack this thread, I've switched over to postgres container now, and got somewhat further. 
But not it's erroring in the actual database not the connection, 

 

"django.db.utils.ProgrammingError: relation "exercises_exercisebase" does not exist
LINE 1: ...LECT "exercises_exercisebase"."id" AS "col1" FROM "exercises..."

Link to comment

By the error it would seem the db doesn't exist in your Postgress instance, double check the spelling. You can check what DBs your instance is managing with:

 

postgres=# \l

 

I'm actually stumbling into a permission's issue:

 

PermissionError: [Errno 13] Permission denied: '/home/wger/static/CACHE'

 

Did you have any trouble with that?

Link to comment
1 hour ago, GuillermoMG said:

By the error it would seem the db doesn't exist in your Postgress instance, double check the spelling. You can check what DBs your instance is managing with:

 

postgres=# \l

 

I'm actually stumbling into a permission's issue:

 

PermissionError: [Errno 13] Permission denied: '/home/wger/static/CACHE'

 

Did you have any trouble with that?

So yes you're right, I went back in and created a proper postgres database and user. I assigned the user full admin rights in the end as I was coming across the same permissions error (I know this might not be the best security wise, but I'm only going to host wger on this postgres container. 

So I'm not at the stage where I can "access" the web gui, but it still errors. 

The error I'm getting now on the web gui is,
"An error occurred

There was an error on the server while processing your request. Try refreshing your browser and if that doesn't help, please try again at a later time. If the problem persists, you can seek help in ways listed below:"

And from within the logfiles of the container I'm getting some errors (lol), such as,

 

[09/Jan/2024 07:37:17] "GET / HTTP/1.1" 302 0
[09/Jan/2024 07:37:17] "GET /en-gb/ HTTP/1.1" 302 0
ERROR 2024-01-09 07:37:18,073 log Internal Server Error: /en-gb/software/features
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

 

 

and, 

 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/wger/src/wger/software/views.py", line 48, in features
    result_github_api = requests.get('https://api.github.com/repos/wger-project/wger').json()
  File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


They seem to be the related to each other, but I have no idea how or why it's throwing them

Link to comment
1 hour ago, GuillermoMG said:

 

PermissionError: [Errno 13] Permission denied: '/home/wger/static/CACHE'

 

Did you have any trouble with that?

 

So, after a few restarts, I am now getting this error when refreshing the web GUI yeah. 
(along with a bunch of WARNINGS about logs not found)

I tried to chown the static folder, but I can't use SUDO and su just asks for a password that I don't have, lol

Edited by extinct_waffle
Additional information added
Link to comment

Changing the appdata/wger/ permission to 777 (yes... yes... I know) at least get's me a bit further, the page is accesible, but nothing loads. In the logs can see everything spammed with:

 

01/09/2024
04:37:59 PM
[09/Jan/2024 16:37:59] "GET /static/images/icons/flags/pt-br.svg HTTP/1.1" 404 2883
01/09/2024
04:37:59 PM
WARNING 2024-01-09 16:37:59,304 log Not Found: /static/images/icons/flags/tr.svg
01/09/2024
04:37:59 PM
WARNING 2024-01-09 16:37:59,306 log Not Found: /static/images/icons/flags/sv.svg
01/09/2024
04:37:59 PM
[09/Jan/2024 16:37:59] "GET /static/images/icons/flags/tr.svg HTTP/1.1" 404 2883
01/09/2024
04:37:59 PM
[09/Jan/2024 16:37:59] "GET /static/images/icons/flags/sv.svg HTTP/1.1" 404 2883
01/09/2024
04:37:59 PM
WARNING 2024-01-09 16:37:59,309 log Not Found: /static/images/icons/flags/uk.svg
01/09/2024
04:37:59 PM
[09/Jan/2024 16:37:59] "GET /static/images/icons/flags/uk.svg HTTP/1.1" 404 2883
01/09/2024
04:37:59 PM
WARNING 2024-01-09 16:37:59,313 log Not Found: /static/images/icons/flags/zh-hans.svg
01/09/2024
04:37:59 PM
[09/Jan/2024 16:37:59] "GET /static/images/icons/flags/zh-hans.svg HTTP/1.1" 404 2883
01/09/2024
04:37:59 PM
WARNING 2024-01-09 16:37:59,317 log Not Found: /static/images/logos/play-store/google-play-badge.svg
01/09/2024
04:37:59 PM
[09/Jan/2024 16:37:59] "GET /static/images/logos/play-store/google-play-badge.svg HTTP/1.1" 404 2883
01/09/2024
04:37:59 PM
WARNING 2024-01-09 16:37:59,321 log Not Found: /static/images/favicon.png
01/09/2024
04:37:59 PM
[09/Jan/2024 16:37:59] "GET /static/images/favicon.png HTTP/1.1" 404 2883

 

Link to comment

This is exactly where I am now! 


I even changed the location for the MEDIA_URL and the STATIC_URL within the "/home/wger/src/settings.py" to point to the locations, "/home/wger/media" and "/home/wger/static" respectively, and copied the files over from the "/home/wger/src/wger/core/" for the media and the static folders into the above new locations. And then 777'd everything, lol. 

Still getting errors, even though the location it's not pointing at both exists, and has the files in. 

e.g.

From the Logs

WARNING 2024-01-09 09:26:30,740 log Not Found: /home/wger/static/images/icons/flags/sv.svg
[09/Jan/2024 09:26:30] "GET /home/wger/static/images/icons/flags/sv.svg HTTP/1.1" 404 2933
WARNING 2024-01-09 09:26:30,745 log Not Found: /home/wger/static/images/icons/flags/tr.svg
[09/Jan/2024 09:26:30] "GET /home/wger/static/images/icons/flags/tr.svg HTTP/1.1" 404 2933
WARNING 2024-01-09 09:26:30,749 log Not Found: /home/wger/static/images/icons/flags/zh-hans.svg
[09/Jan/2024 09:26:30] "GET /home/wger/static/images/icons/flags/zh-hans.svg HTTP/1.1" 404 2933
WARNING 2024-01-09 09:26:30,753 log Not Found: /home/wger/static/images/icons/flags/uk.svg

 

From terminal 

wger@b4ce7cdcf286:~/static/images/icons/flags$ pwd
/home/wger/static/images/icons/flags
wger@b4ce7cdcf286:~/static/images/icons/flags$ ls
ar.svg  bg.svg  cs.svg  el.svg     en-gb.svg  eo.svg     es-co.svg  es-ni.svg  es-ve.svg  fr.svg  hr.svg  it.svg  nl.svg  pt-br.svg  ru.svg  tr.svg  zh-hans.svg
az.svg  ca.svg  de.svg  en-au.svg  en.svg     es-ar.svg  es-mx.svg  es.svg     fa.svg     he.svg  id.svg  nb.svg  pl.svg  pt.svg     sv.svg  uk.svg
wger@b4ce7cdcf286:~/static/images/icons/flags$ 
Link to comment

This is the solution: https://github.com/wger-project/docker/issues/17#issuecomment-1112959239

 

Setting DJANGO_DEBUG=True as one of the env variables fixes the issue (by using django´s inbuilt webserver?).

 

I also added these variables, before adding DJANGO_DEBUG=True, so don't know if they did anything in the end, other than catching locally the files. Taken from https://github.com/wger-project/docker/blob/master/config/prod.env.


 

SYNC_EXERCISES_ON_STARTUP=True
DOWNLOAD_EXERCISE_IMAGES_ON_STARTUP=True
SYNC_EXERCISES_CELERY=True
SYNC_EXERCISE_IMAGES_CELERY=True
SYNC_EXERCISE_VIDEOS_CELERY=True
USE_CELERY=True
CELERY_BROKER=redis://cache:6379/2
CELERY_BACKEND=redis://cache:6379/2
CELERY_FLOWER_PASSWORD=adminadmin

 

 

Same can be done from the docker container:

 

python3 manage.py sync-exercises
python3 manage.py download-exercise-images
python3 manage.py download-exercise-videos


Still have the issue that the wger folder is 777... but that will be a problem for another day.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...