diff --git a/README.md b/README.md index 044e8f9f..4673ecdf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Creating an application with a Quarkus code sample -**Note:** The Quarkus code sample uses the **8081** HTTP port. +**Note:** The Quarkus code sample uses the **8080** HTTP port. Before you begin creating an application with this `devfile` code sample, it's helpful to understand the relationship between the `devfile` and `Dockerfile` and how they contribute to your build. You can find these files at the following URLs: @@ -15,4 +15,4 @@ Before you begin creating an application with this `devfile` code sample, it's h ### Additional resources * For more information about Quarkus, see [quarkus.io](https://quarkus.io/). * For more information about devfiles, see [Devfile.io](https://devfile.io/). -* For more information about Dockerfiles, see [Dockerfile reference](https://docs.docker.com/engine/reference/builder/). \ No newline at end of file +* For more information about Dockerfiles, see [Dockerfile reference](https://docs.docker.com/engine/reference/builder/). diff --git a/deploy.yaml b/deploy.yaml index e0f5a9be..8590a59b 100644 --- a/deploy.yaml +++ b/deploy.yaml @@ -17,7 +17,7 @@ spec: image: java-quarkus-image:latest ports: - name: http - containerPort: 8081 + containerPort: 8080 protocol: TCP resources: requests: @@ -30,9 +30,9 @@ metadata: name: my-java-quarkus-svc spec: ports: - - name: http-8081 - port: 8081 + - name: http-8080 + port: 8080 protocol: TCP - targetPort: 8081 + targetPort: 8080 selector: app: java-quarkus-app \ No newline at end of file diff --git a/devfile.yaml b/devfile.yaml index 4892da48..6740f5b7 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,7 +1,7 @@ schemaVersion: 2.2.0 metadata: name: java-quarkus - version: 1.2.1 + version: 2.0.0 provider: Red Hat supportUrl: https://github.com/devfile-samples/devfile-support#support-information icon: https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg @@ -31,12 +31,12 @@ components: deployment/replicas: 1 deployment/cpuRequest: 10m deployment/memoryRequest: 100Mi - deployment/container-port: 8081 + deployment/container-port: 8080 kubernetes: uri: deploy.yaml endpoints: - - name: http-8081 - targetPort: 8081 + - name: http-8080 + targetPort: 8080 path: / commands: - id: build-image diff --git a/src/main/docker/Dockerfile.jvm.staged b/src/main/docker/Dockerfile.jvm.staged index 2845bb9c..c5c6ece8 100644 --- a/src/main/docker/Dockerfile.jvm.staged +++ b/src/main/docker/Dockerfile.jvm.staged @@ -7,14 +7,14 @@ # # Then run the container using: # -# docker run -i --rm -p 8081:8081 quarkus/code-with-quarkus-jvm +# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-jvm # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5050 # # Then run the container using : # -# docker run -i --rm -p 8081:8081 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/code-with-quarkus-jvm +# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/code-with-quarkus-jvm # ### FROM registry.access.redhat.com/ubi8/openjdk-17:1.15-1.1682053058 @@ -41,12 +41,12 @@ RUN if [ ! -d /build/target/quarkus-app ] ; then mkdir -p /build/target/quarkus- FROM registry.access.redhat.com/ubi8/openjdk-17-runtime:1.15-1.1682053056 # Configure the JAVA_OPTS, you can add -XshowSettings:vm to also display the heap size. -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8081 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" # We make four distinct layers so if there are application changes the library layers can be re-used COPY --from=0 --chown=1001 /build/target/quarkus-app/lib/ /deployments/lib/ COPY --from=0 --chown=1001 /build/target/quarkus-app/*.jar /deployments/export-run-artifact.jar COPY --from=0 --chown=1001 /build/target/quarkus-app/app/ /deployments/app/ COPY --from=0 --chown=1001 /build/target/quarkus-app/quarkus/ /deployments/quarkus/ -EXPOSE 8081 +EXPOSE 8080 ENTRYPOINT ["/opt/jboss/container/java/run/run-java.sh"]