Skip to content

tradercentric/reactive-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn SpringBoot, WebFlux, Rest, Swagger, Docker, and OpenShift/Minishift

Once the application is running, the available rest calls are listed at

http://localhost:8080/swagger-ui.html

Dockerfile (in the directory where pom.xml resided):

FROM registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift as build

USER root

WORKDIR /app COPY ./ .

RUN /etc/alternatives/mvn clean install

EXPOSE 8080

ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "target/reactive-web-1.0.jar"]

To build image and run the docker container of the image

docker build -t mywebfluxapp -f Dockerfile .
docker run -d -p 8080:8080 --name mywebflux mywebfluxapp

Clean ups

docker container stop $(docker container ls -aq)
docker container rm $(docker container ls -aq)
docker image rm $(docker image ls -aq)

Build in minishift from local source code

oc new-app registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift~. --name=myapp
oc start-build myapp --from-dir=. --follow
oc expose svc/myapp --port 8080

Build in minishift from remote github source code

oc import-image java:8 --from=registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift --confirm
oc new-app --name reactive-web "java:8~https://github.com/tradercentric/reactive-web.git"
oc expose svc/reactive-web --port 8080

Oc logs & status & etc.

oc logs -f bc/reactive-web
oc rollout status -w dc/reactive-web
echo http://$(oc get route reactive-web -o jsonpath='{.spec.host}{"\n"}')
oc get all --selector app=reactive-web -o name
oc delete all --selector app=reactive-web

Minishift remove and install

minishift delete --clear-cache
delete %USERPROFILE%/.minishift
minishift start --show-libmachine-logs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published