Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 866 Bytes

README.md

File metadata and controls

13 lines (7 loc) · 866 Bytes

First run mysql as docker container

docker run --name demo-mysql -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=demo -e MYSQL_USER=demo_user -e MYSQL_PASSWORD=demo_pass -itd mysql:5.6

Then build this project using below command

mvn clean install dockerfile:build dockerfile:push

Now run SPA Spring Boot Docker container

docker run -p 8080:8080 -e spring.profiles.active=prod -e spring.datasource.url=jdbc:mysql://mysql:3306/demo -e spring.datasource.username=demo_user -e spring.datasource.password=demo_pass --link demo-mysql:mysql --name spa -itd rajeshgheware/spa-sboot-docker:1.3.0

docker run -p 8080:8080 -e spring.profiles.active=prod -e spring.datasource.url=jdbc:mysql://mysql:3306/demo -e spring.datasource.username=demo_user -e spring.datasource.password=demo_pass --link demo-mysql:mysql --name spa -it rajeshgheware/spa-sboot-docker:1.3.0