Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wger with nginx proxy manager #77

Closed
JonneSaloranta opened this issue Jan 22, 2024 · 5 comments
Closed

wger with nginx proxy manager #77

JonneSaloranta opened this issue Jan 22, 2024 · 5 comments

Comments

@JonneSaloranta
Copy link

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.

@rolandgeider
Copy link
Member

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

@JonneSaloranta
Copy link
Author

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.

@rolandgeider
Copy link
Member

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

@JonneSaloranta
Copy link
Author

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.

@bbkz
Copy link

bbkz commented Jan 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants