API REST para cadastro de novos clientes
commands with docker:
Setting up your database
step 1: docker-compose down
step 2: docker-compose build
step 3: docker-compose up -d --force-recreate
Veryfing database in container:
step 1: docker exec -it 'image id' psql postgres CadastrosDB
step 2: \dt
step 3: select * from CadastrosDB;
Build and run spring boot app
step 1: docker build -t crud-banco-springboot-postgresql-hibernate:latest .
step 2: docker run -p 8080:8080 --network=host crud-banco-springboot-postgresql-hibernate
Verify app logs:
docker logs springboot-postgresql
Verify network and ports
docker network inspect 'my network'
lsof -i :port
kill -9 'process id'