- https://hub.docker.com/u/mabeatti
- Declaring Spring Data JPA repository interfaces
- Using Spring Data query methods
- Exposing RESTful APIs with Spring Data REST
- Creating HTTP methods for updating and deleting data
- Configuring security with JSON web tokens
- Leveraging Docker for MySQL database access
- Dockerizing your microservice
docker run --detach --name ec-mysql -p 6604:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=explorecali -e MYSQL_USER=cali_user -e MYSQL_PASSWORD=cali_pass -d mysql
docker images
docker ps -a
docker run -it --link ec-mysql:mysql --rm mysql sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
docker stop ec-mysql
docker start ec-mysql
docker rm ec-mysql
docker rmi mysql:latest
`` mvn spring-boot:build-image -DskipTests
``
`` mvn spring-boot:build-image -DskipTests
``
mvn spring-boot:build-image -DskipTests
docker run --name ec-app-default -p 8080:8080 -d mabeatti/mmv2-explorecali-default:3.0.0-SNAPSHOT
set mysql in applications.properties
docker run --name ec-app-mysql -p 8181:8080 --link ec-mysql:mysql -d mabeatti/mmv2-explorecali-mysql:3.0.0-SNAPSHOT
set docker in applications.properties
docker run --name ec-app-docker -p 8282:8080 -v ~/db/migration:/var/migration -e server=ec-mysql -e port=3306 -e dbuser=cali_user -e dbpassword=cali_pass --link ec-mysql:mysql -d mabeatti/mmv2-explorecali-docker:3.0.0-SNAPSHOT
docker exec -t -i ec-app /bin/bash
######Login to Docker hub locally
docker login
docker tag <image id> <docker hub repository>/explorecali-default:latest
docker pull <docker hub repository>/explorecali-default
docker run --name ec-app-default -p 8080:8080 -d <docker hub repository>/explorecali-default