Skip to content

Commit

Permalink
Koyeb deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed May 10, 2024
1 parent 871d9a6 commit bb3249f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Dockerfile.koyeb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Start with a base image containing Maven
FROM maven:3.8.3-openjdk-17-slim AS build

# Set the working directory in the container
WORKDIR /app

# Copy the project source
COPY . .

# Build the project
RUN mvn clean package

# Use Red Hat's OpenJDK 17 as base image
FROM registry.access.redhat.com/ubi8/openjdk-17:1.14

# Set environment variables
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'

# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --from=build --chown=185 /app/target/quarkus-app/lib/ /deployments/lib/
COPY --from=build --chown=185 /app/target/quarkus-app/*.jar /deployments/
COPY --from=build --chown=185 /app/target/quarkus-app/app/ /deployments/app/
COPY --from=build --chown=185 /app/target/quarkus-app/quarkus/ /deployments/quarkus/

# Expose port
EXPOSE 8081

# Set user
USER 185

# Additional environment variables
ENV AB_JOLOKIA_OFF=""
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"

0 comments on commit bb3249f

Please sign in to comment.