{"id":116,"date":"2018-03-09T21:15:48","date_gmt":"2018-03-09T21:15:48","guid":{"rendered":"http:\/\/tonysbit.blog\/?p=116"},"modified":"2018-03-09T21:15:48","modified_gmt":"2018-03-09T21:15:48","slug":"deploying-a-ssl-protected-containerized-app-part-3","status":"publish","type":"post","link":"https:\/\/tonysbit.blog\/?p=116","title":{"rendered":"Deploying a SSL Protected Containerized App: Part 3"},"content":{"rendered":"
Let’s quickly do a checklist of what we have so far<\/p>\n
If you have not completed the steps above, review part 1<\/a> and part 2<\/a>.<\/p>\n SSH into the virtual machine and swap to the root user.<\/p>\n Move to the root directory of the machine (Running Create two directories (This is done for simplicity)<\/p>\n Swap to the docker directory<\/p>\n Create a docker compose file with the following content (It is case and space sensitive, read more<\/a> about docker compose).<\/p>\n Unfortunately, Nginx-Proxy must read the SSL certificates as <domain name>.crt and the key as <domain name>.key. as such we need to move and rename the original certificates generated for our domain.<\/p>\n Run the following commands to copy the certificates to the relevant folders and rename:<\/p>\nDeploying the Final Stack<\/h1>\n
cd \/<\/code>)<\/p>\n
Creating our directories<\/h2>\n
\n
Mkdir \/certs<\/code><\/p>\n
\n
Mkdir \/docker<\/code><\/p>\n
cd \/docker<\/code><\/p>\n
Moving and renaming our SSL Certificates<\/h2>\n
cp \/etc\/letsencrypt\/live\/<your domain><\/span><\/strong>\/fullchain.pem \/certs\/<your domain><\/strong><\/span>.crt<\/code><\/p>\n