docker network create recipes-network
sudo mkdir -p /opt/mongodb/data
sudo chmod 777 /opt/mongodb/data
docker run -d --name mongodb -p 27017:27017 --network recipes-network -v /opt/mongodb/data:/data/db mongo:latest
- populate mongodb using Mongo Compass
sudo mkdir -p /opt/mongodb/data
sudo chmod -R 777 /opt/rest.recipes/
openssl req -newkey rsa:2048 -keyout footeware.ca.test.key -x509 -days 365 -out footeware.ca.test.crt
openssl rsa -in footeware.ca.test.key -aes256 -out aes.pem
- Place cert, key and its AES version in /src/main/resources.
mvn clean package
or use the-BUILD
eclipse launch config- run as Spring Boot app using
-RUN
eclipse launch config. It uses the-dev
profile that uses the self-signed cert. - NOT WORKING: https://localhost:9000/recipes?pageNumber=0&pageSize=10
docker run -d --name rest.recipes -p 9000:9000 --network recipes-network -v /opt/rest.recipes/logs:/opt/rest.recipes/logs -t rest.recipes:[version]
curl -v -u craig -i 'http://localhost:9000/recipes?pageNumber=0&pageSize=10'
- commit changes to git and create tag [version]
docker tag rest.recipes:[version] craigfoote/rest.recipes:[version]
docker push craigfoote/rest.recipes:[version]
docker tag rest.recipes:[version] craigfoote/rest.recipes:latest
docker push craigfoote/rest.recipes:latest