Open stutz64 opened 1 year ago
I have the same problem with the same docker image, have you been able to solve it? Thanks
Hi! How are you running the setup? I started up the latest image and everything seems to be working fine
Same here, no images.
Hey, got the same problem. I started the development version of wger with the exact same env and nginx files that are provided and can't see the exercise pictures :( Is there any way to figure out what's happening? Would love to start using it, but this way it's not really working. Weirdly enough, with the exercises that are already there I also can't add pictures, too (nothing happens if I add them). If I create an exercise from the start, it works. If I want to add pictures again, the editor won't let me. Is there any way to figure out what's going on?
edit: the pictures have definitely been copied into the volume.
Can you open the developer tools and take a look at the network when you load the page? (More Tools > Developer Tools) If the images are not being served correctly you should see a lot of red entries with a status code of 404 or something similar. Also, are you accessing the docker instance directly over its IP or via some hostname etc?
Also, is there anything happening in the logs while you open the page? Ideally you should see something like this
wger_nginx | 172.19.0.1 - - [29/Nov/2023:11:06:20 +0000] "GET /media/exercise-images/92/ca71df8e-a6d6-453f-a25a-f4cebae3b970.png HTTP/1.1" 200 123420 "http://localhost/de/exercise/overview/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" "-"
wger_nginx | 172.19.0.1 - - [29/Nov/2023:11:06:20 +0000] "GET /media/exercise-images/94/6dee2f60-aea2-4f2d-9bf6-aef50c4f9483.png HTTP/1.1" 200 23109 "http://localhost/de/exercise/overview/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" "-"
wger_nginx | 172.19.0.1 - - [29/Nov/2023:11:06:20 +0000] "GET /media/exercise-images/75/87a312b7-d01e-4f69-9bda-1ed2f1fcd9ab.png HTTP/1.1" 200 46779 "http://localhost/de/exercise/overview/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" "-"
wger_nginx | 172.19.0.1 - - [29/Nov/2023:11:06:20 +0000] "GET /media/exercise-images/91/7276a19e-06d0-45ae-a2a3-569bed75686b.png HTTP/1.1" 200 75183 "http://localhost/de/exercise/overview/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" "-"
wger_nginx | 172.19.0.1 - - [29/Nov/2023:11:06:20 +0000] "GET /media/exercise-images/73/08517378-bc36-4f6b-9952-1f45a02d936e.png HTTP/1.1" 200 89870 "http://localhost/de/exercise/overview/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" "-"
wger_nginx | 172.19.0.1 - - [29/Nov/2023:11:06:20 +0000] "GET /media/exercise-images/95/065f9418-6245-46ae-8e24-b4013ce084e4.png HTTP/1.1" 200 131663 "http://localhost/de/exercise/overview/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" "-"
What happens when you try to re-sync the exercises and images? Does the script say that the image is not found in the local db and is creating it or that it is already present and is skipping it?
docker compose exec web python3 manage.py sync-exercises
docker compose exec web python3 manage.py download-exercise-images
Finally, it might be some caching issues (which I don't think, this should have cleared after some time), but just to be sure,
docker compose exec web python3 manage.py warmup-exercise-api-cache.py --force
would reset it
Images can be accessed directly from the web browser (e.g. "http://[ip]/media/exercise-images....b4013ce084e4.png") but are not loaded onto pages automatically. After a day or two it is working now. Maybe cache problem like you said.
I have repulled the image but strangely I do have the images in the folders, but they aren't displaying. I have already ran the lower commands in the container, but they didn't seem to work.
python3 manage.py sync-exercises python3 manage.py download-exercise-images python3 manage.py warmup-exercise-api-cache.--force
Hi there,
sorry maybe my comment doesn't help much, as i never used docker-compose or the wger/apache image. But when i look at the docker-compose.yml
i don't see the usage of the wger/apache
image.
In general django serves the output of the python code with gunicorn and requires a webserver to serve the static and media files directly and serves the application as a reverse proxy to gunicorn.
Maybe this docker-compose.yml here works better for you. It uses nginx to serve the media files (images) with this following configuration.
Images will now be displayed. I have now created it with the correct Docker image :) (Previously I have used the apache image, and now I am using wger_server image from docker hub)
I just wanted to say:
I did the following and images were not displaying:
docker compose exec web python3 manage.py sync-exercises
docker compose exec web python3 manage.py download-exercise-images
But clearing cache:
docker exec web python3 manage.py warmup-exercise-api-cache --force
Worked perfectly. Using the suggested docker-compose.
When I try to download my workout plan, I can't download it with images because of the following error message: Environment:
How can I fix the error? I also don't see any pictures when selecting the exercices. I use the latest docker-compose version of wger. The docker-compose file is the following:
Also with inspect element I get the error that the images hadn't been found.![image](https://github.com/wger-project/docker/assets/74467232/238e92ba-2a92-46d5-a504-137f48838447)