I have a docker container that just shows random pictures of cats being random. The image for the container resides on the server I use for my personal site, and I would like to add a route in Nginx that allows me to navigate to the app and see the cat of the day.
Using the following configuration, I get 404'd when I attempt to navigate to my_site.com/cats
.
sites-available/my_site.conf
:
server {
listen 443 ssl;
include snippets/my_site-ssl.conf;
include snippets/ssl-params.conf;
server_name my_site.com www.my_site.com;
root /var/www/my_site.com/html;
#working location directives for my_site here...
location = /cats {
proxy_pass https://localhost:5001;
}
}
The docker container is invoked with:
$ docker run --rm -d -p 5001:5000 --name cats handsomegorilla/cats
Every permutation of search I've performed for solving this problem just returns results for some variation of 'how to run nginx in a container', which is decidedly not my objective here.
I'm new to using Docker, so it's possible that this is something I should be asking Stack Overflow, but I thought I would begin with the server and work my way back to Docker.