Javascript Dev, who wants to build amazing things with the MERN stack. I also have an interest in Data science and Machine-learning. Getting better every day. Filled with wisdom from above!!
Great write Sukhbir, trying to follow it but my situation is quite different. I have a server that runs Nginx, and I am deploying a CMS (Xibo) on it. Cms runs by default on port 80, but cannot run because Nginx is listening there. So to run it I kill the Nginx process. Note that the cms is running inside of a docker-compose container.
So I am supposed to change its port, then use a reverse proxy to bring it back on port 80, when this works on HTTP, then I can do the securing Phew!! You did help understand things better, so i will keep hacking away.
Thanks for response, but how can I use ALT istead of CTRL? It doesn't work on my Windows notebook. I am pasting it to VS Code. When I format it like this
Hi, I have completed this tutorial, and it helped me a lot, however I needed to do a couple of changes in order to work on my side.
First, I changed the name of the networks, since on my side they were called webservice1_default instead of site1_default. I found the name of the network by executing this docker command: "docker network ls"
Second, I had to found out which were my containers' ip, since the ones listed here are different than mine. I found the ips by inspecting the networks I found before. I used "docker network inspect NameOfYourNetwork" command.
Finally, I needed to do some modifications in docker-compose.yml file for the proxy, since the identitation was no correct. In the below image you can see the correct identation.
Hello This tutorial does not work, but I success with another 1- A part is missing ; The site1_default and site2_default networks should be created before,
2- The container names site1_app_1 and site2_app_1 are not defined, because autogenerated by docker : in my Docker version it generates webservice1_app_1 and webservice1_app_2. The best practice is to give a name to containers in the docker-compose.yml file, using the "container_name" keyword . 3- Cannot resolve the container names inside the Nginx container : so the proxy_pass directive dos not work, I think I must configure something in my Docker configuration, but it is not explained in this tutorial 4- Let's encrypt does not work generate the certificates because the server does not exist in the DNS ( pointer A missing) 5- site1.test and site2.test are bad declared in the /etc/hosts file . Normally you should declare in one line, like that : "172.31.30.78 site1.test site2.test" Best regards
First at all, thanks !!! great tutorial, with some mistakes it's true, but it shows cooperation of all involved. I followed not only this blog, but the instructions from davbaster and it worked well.
I promise I will fill that one day. If it's still this placeholder text, then hopefully I am too busy making something awesome instead. Have a good day, stranger!
Highest possible, didn't change anything. I still feel as smart as when I was at 15.
Work
"Crazy-spider-monkey-awesome-web developer" Seriously, startups should stop giving such crazy titles at God if you are religious, Shopmetrics if you are not.
Great write Sukhbir, trying to follow it but my situation is quite different.
I have a server that runs Nginx, and I am deploying a CMS (Xibo) on it.
Cms runs by default on port 80, but cannot run because Nginx is listening there.
So to run it I kill the Nginx process.
Note that the cms is running inside of a docker-compose container.
So I am supposed to change its port, then use a reverse proxy to bring it back on port 80, when this works on HTTP, then I can do the securing
Phew!!
You did help understand things better, so i will keep hacking away.
Can you please fix the indentation in the yml files? I cannot build the docker-compose.yml for proxy server (the last yml in the article)
Try copying the code using ALT instead of CTRL.
Thanks for response, but how can I use ALT istead of CTRL? It doesn't work on my Windows notebook. I am pasting it to VS Code. When I format it like this
It gives me an error
What is wrong?
OK, I got it, but it took me some time to figure it out
Webservice 1
Webservice 2
proxy
Hi,
I have completed this tutorial, and it helped me a lot, however I needed to do a couple of changes in order to work on my side.
First, I changed the name of the networks, since on my side they were called webservice1_default instead of site1_default. I found the name of the network by executing this docker command: "docker network ls"
dev-to-uploads.s3.amazonaws.com/i/...
Second, I had to found out which were my containers' ip, since the ones listed here are different than mine. I found the ips by inspecting the networks I found before. I used "docker network inspect NameOfYourNetwork" command.
dev-to-uploads.s3.amazonaws.com/i/...
Third, I had to modify my hosts file with the correct ips I found in the previous step.
dev-to-uploads.s3.amazonaws.com/i/...
Finally, I needed to do some modifications in docker-compose.yml file for the proxy, since the identitation was no correct. In the below image you can see the correct identation.
dev-to-uploads.s3.amazonaws.com/i/...
Thanks to the author for taking the time to do this tutorial.
hi, the implementation i have error
host not found in upstream "site1_app_1" in /etc/nginx/conf.d/default.conf:14
host not found in upstream "site1_app_1" in /etc/nginx/conf.d/default.conf:14
Hello
This tutorial does not work, but I success with another
1- A part is missing ; The site1_default and site2_default networks should be created before,
2- The container names site1_app_1 and site2_app_1 are not defined, because autogenerated by docker : in my Docker version it generates webservice1_app_1 and webservice1_app_2. The best practice is to give a name to containers in the docker-compose.yml file, using the "container_name" keyword .
3- Cannot resolve the container names inside the Nginx container : so the proxy_pass directive dos not work, I think I must configure something in my Docker configuration, but it is not explained in this tutorial
4- Let's encrypt does not work generate the certificates because the server does not exist in the DNS ( pointer A missing)
5- site1.test and site2.test are bad declared in the /etc/hosts file . Normally you should declare in one line, like that : "172.31.30.78 site1.test site2.test"
Best regards
First at all, thanks !!! great tutorial, with some mistakes it's true, but it shows cooperation of all involved. I followed not only this blog, but the instructions from davbaster and it worked well.
Thanks again
do you have a github repo for this?
Unfortunately, I don’t. Will keep in mind next time. Thanks!
can anyone make a video about this please
Very helpful article - thanks!
Do you already know about
smnrp.net
ERROR: In file './docker-compose.yml', service must be a mapping, not a NoneType.
can anyone help me with this please
@1nnikan1 I know it's a year late, but if anyone stumbles upon this in the future: see comment above