wger-project / docker

Production...ish docker-compose image for wger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wger with nginx proxy manager

JonneSaloranta opened this issue · comments

Hey, the issue is that i've already got nginx proxy manager(NPM) running on port 80, 443 and 81 and i don't seem to figure out how would i e.g forward from the NPM to the wger instance of nginx proxy. If anybody has done this or knows how to solve my problem, it would be very appreciated.
I'll provide more information if needed, but my .env and docker-compose are mostly unchanged from the provided ones.

hi! Using your own nginx shouldn't be a problem, you'll probably just need to change these settings:

  • remove the nginx service from the compose file
  • expose the application over port 8000
  • do a docker volume inspect docker_static and docker volume inspect docker_media to see where the static and media files are stored
  • configure your own nginx to reverse proxy to 8000 and serve the static files from the folder

After hours of trying get the wger_server to run healthy, i finally managed to do it by checking others issues (#45 ). had permission issues and the wger_server running before the db does. All working now but still couldn't reach the website.. the issue had something to do with the expose: 8000 and by changin it to ports: - "8000:8000" i managed to reach the site without any static/media files yet. I'll keep updating progress.

ah, you weren't using the volumes? And yeah all those other ports (db, cache, etc.) are exposed only within the network created for the application. If you want to reach them from the outside you need to map them

The "trick" for the static files is that django won't serve them during production so you need to setup another server that does that. You can configure django to generate the "correct" urls (in our case /static and /media) and you need to make sure they are served correctly from there

Unfortunately i've come to the conclusion that wger is way too cumbersome and time consuming to setup so i'll leave it here and close the issue. Might try wger in the future if it becomes easier to deploy.

commented

Sad to hear. But meanwhile you may want to get into kubernetes, once you have your kubernetes cluster configured the way you want it is easy to install wger into it.