From 20e24db2d273c7091aadf23c123a25a13a77f4c0 Mon Sep 17 00:00:00 2001 From: Maysun J Faisal Date: Mon, 10 Jul 2023 13:29:30 -0400 Subject: [PATCH 1/4] Update port from 8081 to 8080 Signed-off-by: Maysun J Faisal --- README.md | 2 +- deploy.yaml | 8 ++++---- devfile.yaml | 6 +++--- src/main/docker/Dockerfile.jvm.staged | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 044e8f9f..bd4a51f1 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: 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..140eec3f 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -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"] From 8b9ca8f7071bd27df69b6f0ed5f602d1018e2a39 Mon Sep 17 00:00:00 2001 From: thepetk Date: Mon, 9 Oct 2023 16:37:31 +0100 Subject: [PATCH 2/4] Update version of sample devfile Signed-off-by: thepetk --- devfile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devfile.yaml b/devfile.yaml index 140eec3f..640293bf 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,7 +1,7 @@ schemaVersion: 2.2.0 metadata: name: java-quarkus - version: 1.2.1 + version: 1.2.2 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 From 57b1c6a4636c94f6e46193c637ef7aedd74c159f Mon Sep 17 00:00:00 2001 From: thepetk Date: Wed, 18 Oct 2023 15:12:29 +0100 Subject: [PATCH 3/4] Finalize sample version Signed-off-by: thepetk --- README.md | 2 +- devfile.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bd4a51f1..88880d96 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 **8080** HTTP port. +**Note:** The Quarkus code sample version `2.0.0` 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: diff --git a/devfile.yaml b/devfile.yaml index 640293bf..6740f5b7 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,7 +1,7 @@ schemaVersion: 2.2.0 metadata: name: java-quarkus - version: 1.2.2 + 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 From f7bd5c7fae2f54594a206330f46a2aa50809c1d4 Mon Sep 17 00:00:00 2001 From: Theofanis Petkos Date: Mon, 23 Oct 2023 13:25:58 +0100 Subject: [PATCH 4/4] Update README.md Signed-off-by: thepetk --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 88880d96..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 version `2.0.0` uses the **8080** 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/).