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

Updated nginx documentation to include image server instructions #2826

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

sohmc
Copy link
Contributor

@sohmc sohmc commented Dec 21, 2023

This PR provides additional information to serve tandoor images from an nginx reverse proxy by bind-mounting the mediafiles directory and then serving the images directly from the server, and resolves #2796

Please feel free to make modifications to the documentation as needed to fit the style of the existing style.

Code/configuration released under AGPL. I'm not sure how you all are releasing your documentation. Let me know what license you need and happy to release it under those terms.

@vabene1111
Copy link
Collaborator

The standard nginx config included in the docker image already does the media serving part so I dont really understand why you want to add the explanation (which is on its own correct) should be added to the docs as people just need to use the container provided

see https://github.com/TandoorRecipes/recipes/blob/develop/nginx/conf.d/Recipes.conf#L8

@sohmc
Copy link
Contributor Author

sohmc commented Dec 22, 2023

The documentation as currently provided does not mention Recipes.conf at all. The example given under Pure Nginx does not include the /media location context, nor does it describe how to use nginx to serve images.

@ignas-poklad
Copy link

You're missing static files... Mine looks like this:

location /media/ {
  alias /static_files/recipes/media/;
  autoindex off;
}

location /static/ {
  alias /static_files/recipes/static/;
  autoindex off;
}

I too don't use the default config as I see no benefit in having Nginx behind another Nginx. If you're running only recipes alone or you're having a hard time with the Nginx config, then maybe it makes sense. Otherwise, it's a waste of CPU and RAM for no benefit. What I do is share the media and static volumes between the recipes container and my main Nginx proxy has these config lines.

@vabene1111 vabene1111 merged commit 255ecd4 into TandoorRecipes:develop Jan 28, 2024
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

Successfully merging this pull request may close these issues.

Imported Recipe correctly downloads recipe image but does not display it properly.
3 participants