Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Update port from 8081 to 8080 #23

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
8 changes: 4 additions & 4 deletions deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
image: java-quarkus-image:latest
ports:
- name: http
containerPort: 8081
containerPort: 8080
protocol: TCP
resources:
requests:
Expand All @@ -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
8 changes: 4 additions & 4 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/main/docker/Dockerfile.jvm.staged
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]