Has anyone had some luck getting the tandoor-recipes.nix to work with a Nginx reverse proxy and have Nginx serve media?
No mater what I try, I get the following warning and images are not loading:
Media Serving Warning
Serving media files directly using gunicorn/python isnot recommend! Please follow the steps describedhereto update your installation.
I think the issue is with where the staticfiles and mediafiles are located on the file system, as I am not able to find these directories. Below is my best guess on what the .nix would look like based on this Manual - Tandoor Recipes and https://github.com/NixOS/nixpkgs/blob/d02d818f22c777aa4e854efc3242ec451e5d462a/nixos/modules/services/misc/tandoor-recipes.nix.
services.tandoor-recipes = {
enable = true;
port = 8888;
address = "127.0.0.1";
extraConfig = {
SECRET_KEY = "Sectet_key used for testing";
ENABLE_SIGNUP = "1";
};
};
services.nginx.virtualHosts."tandoor.example.com" = {
enableACME = true;
forceSSL = true;
locations."/static/".alias = "/var/lib/tandoor-recipes/recipes/staticfiles";
locations."/media/".alias = "/var/lib/tandoor-recipes/recipes/mediafiles";
locations."/" = {
proxyPass = "http://127.0.0.1:8888";
proxyWebsockets = true;
};
};
Any suggestion on how to get this working?
Thank you