![]() ![]() ![]() Its the nginx container that would forward our traffic to wordpress container’s port 80. You don’t need to expose any port for wordpress container because we are not going to access wordpress container directly. In this way you can persist your data without any loss. So the benefit of this step is that if you remove the container then it would not delete the volumes that you have mounted. In the volumes array I mounted our local src folder with the html container inside the container. Stdin_open and tty are added to keep container alive forever. So we should wait for the mysql service to be ready first before creating wordpress service. That helps a lot because you don’t need to manually go to server and restart.Īs this wordpress container depends on the mysql server because as you know that wordpress cannot work without a functional mysql server. The benefit of this policy is that in case if your docker container stopped because of any error or crashed then it would automatically restart the container. In docker-compose.yaml file we will create three services: To start you should create following folder structure: I assume that you already have Docker and Docker compose installed and functional already. In this article I am going to show you that how to install SSL Certificate on your wordpress website using Docker, Docker compose, Let’s Encrypt and Digital Ocean.
0 Comments
Leave a Reply. |