Skip to main content

Posts

Showing posts from December, 2019

Deploying a SpringBoot App with an application.properties using a docker-composer.yml file and limiting resources

We saw how to deploy a Spring Boot application with its application.properties plus a .p12 key using  an  SSL certificate to secure Apache Tomcat or Netty  in here  https://springboot-vuejs-reactjs.blogspot.com/2019/12/springboot-with-applicationproperties.html now let's do the same thing but using a docker-composer.yml with volumes instead of using images so that this is going to give us the advantage about updating the .jar application and restarting the container without rebuilding the whole image. let's create a folder in which you are going to have your .jar app , the application.properties and .p12 key to secure with SSL your SpringBoot app and any other files you need to run your application, as in the previous post if you need a mini SpringBoot app to test it, grab this  https://github.com/juandavidmarin368/SpringBoot-Docker I've got a domain name with the one I do the tests with SSL and it is  http://sslbackendtest.xyz/ I've created a file inside

How to deploy a dist.zip VueJS project with SSL using a docker-compose.yml file

If you did the last post on success  https://springboot-vuejs-reactjs.blogspot.com/2019/12/how-to-deploy-distzip-vuejs-project-on.html  doing it using docker-compose using volumes is much easier so that if you are going to make changes on the nginx.conf , or if you're going to add new SSL certificates or if you're going to update the VueJS app , then you are not going to need to rebuild the image and run it again, the only thing is just changing the files on the host you need and restart the .yml file and that's it you're done. if you don't have docker-compose installed on Centos 7 , just run yum update && yum install docker-compose let's create a folder where you are going to have your files, in my case I did something like |--- /Data/nginx |------------- ssl |------------- conf |------------- html inside ssl there are  ( cert-chain.crt and server.key ) inside conf there is ( nginx.conf ) inside html there is the dist folder which has

How to deploy dist.zip VueJS Project on a cutomized Nginx image with SSL - Using a Dockerfile

let's assume you have already activated your certificate SSL so in other words, you have got the cert-chain.crt and the server.key or whatever name you've given to it, and let's assume you've got an nginx.conf   file working already,  let's create a folder in which you're going to create your Docker Image and copy in there the next files: cert-chain.crt server.key dist.zip nginx.conf this is the nginx.conf on centos user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. include /usr/share/nginx/modules/ *.conf ; events {     worker_connections 1024 ; } http {     log_format   main  ' $remote_addr - $remote_user [ $time_local ] " $request " '                       ' $status $body_bytes_sent " $http_referer " '                       '" $http_user_agent " " $http_x_forwarded_for