unraid.headsman400 Posted September 14, 2023 Posted September 14, 2023 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: Anyone on here have experience with this setup? Or have a how to for this set up? Quote
extinct_waffle Posted January 9 Posted January 9 (edited) 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 January 9 by extinct_waffle Quote
extinct_waffle Posted January 9 Posted January 9 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..." Quote
GuillermoMG Posted January 9 Posted January 9 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? Quote
GuillermoMG Posted January 9 Posted January 9 @unraid.headsman400 a bit late, but did you figure out the fields you needed?. Taking for granted you had no other DB managed already, from your Postgress installation template you wanted: POSTGRES_PASSWORD: POSTGRES_USER POSTGRES_DB: PORT: those would apply as: DJANGO_DB_PASSWORD: DJANGO_DB_USER DJANGO_DB_DATABASE: Quote
extinct_waffle Posted January 9 Posted January 9 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 Quote
extinct_waffle Posted January 9 Posted January 9 (edited) 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 January 9 by extinct_waffle Additional information added Quote
GuillermoMG Posted January 9 Posted January 9 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 Quote
extinct_waffle Posted January 9 Posted January 9 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$ Quote
GuillermoMG Posted January 9 Posted January 9 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. Quote
ados Posted June 3 Posted June 3 This docker template is abandoned, barely works. Thanks @GuillermoMG that DJANGO_DEBUG variable was the only thing that got the internal and proxy access portal to load. I did however have to change the permissions to 777 on appdata folder as even 775 didn't work and the permissions were nobody:user which is normal. Once the image files were created I set the permissions back to 755 and it continued to work. Finally, on login CSRF error which I knew was proxy trust issues. This was resolved by adding CSRF_TRUSTED_ORIGINS to template with the same domain as SITE_URL. Quote
ados Posted June 7 Posted June 7 It's installed but all but useless, doesn't have any food entries. Spent ages searching for how to connect it to Open Food Facts which this Github https://github.com/wger-project/wger/issues/422 claims is complete. There's also the DOWNLOAD_INGREDIENTS_FROM variable from here https://wger.readthedocs.io/en/latest/settings.html which does nothing. Overall, terrible app. Quote
ph_ Posted September 2 Posted September 2 Regarding the ingredients, seems those do not get installed by default. The solution can be found in the developers documentation: https://wger.readthedocs.io/en/latest/commands.html#create-settings after installing the container, open up the container console and type: wger load-online-fixtures download and installation takes a few mins. when searching for ingredients in the app, you can find the entries, however Ingredient overview still shows nothing. Best. Quote
Recommended Posts
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.