So I have created a droplet from the docker image on marketplace and have my site docker instance cloned, built and up.
In order for my domain (sub domains) to point a specific service on my docker instance, do I ‘need’ to use nginx?
Assuming I do; does anybody know a decent (up to date) tutorial to show me how to achieve this, please? I have a production and a sandbox subdomain that needs to point to relevant services on my docker instance (already pointing to DO nameservers).
I also now have an nginx docker instance setup and running.
From this point I have found several ways to use nginx to point each subdomain to the relevant port number on a docker instance (using port 8017 and 9017, respectively), but am confused by the number of options/choices to achieve this goal!
I am most likely over thinking it, but any pointers would be greatly appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
Indeed you can use Nginx as a reverse proxy. Here is a quick tutorial on how to set that up:
Keep in mind that the exact Nginx rules that you would need to use in your Nginx config file would depend on the framework that you are using. Feel free to share more details about the Docker containers and the services that you are running inside them and I can give you more details on what rules you need to add to the Nginx server blocks.
Let me know how it goes!