@devkong/cli-nx 0.0.61 → 0.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devkong/cli-nx",
3
- "version": "0.0.61",
3
+ "version": "0.0.63",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
@@ -1,9 +1,13 @@
1
- ## Stage 1: Build native extension image
1
+ # ==============================================
2
+ # Stage 1: Build native executable
3
+ # ==============================================
2
4
  FROM quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21 AS build
3
5
 
6
+ # Switch to root for installation
4
7
  USER root
5
- RUN microdnf install findutils
8
+ RUN microdnf install -y findutils
6
9
 
10
+ # Copy Gradle wrapper and build configuration first (for better caching)
7
11
  COPY --chown=quarkus:quarkus gradlew /code/gradlew
8
12
  COPY --chown=quarkus:quarkus gradle /code/gradle
9
13
  COPY --chown=quarkus:quarkus build.gradle.kts /code/
@@ -11,18 +15,38 @@ COPY --chown=quarkus:quarkus settings.gradle.kts /code/
11
15
  COPY --chown=quarkus:quarkus gradle.properties /code/
12
16
  COPY --chown=quarkus:quarkus .editorconfig /code/
13
17
 
18
+ # Switch to quarkus user for security
14
19
  USER quarkus
15
20
  WORKDIR /code
16
- COPY src /code/src
17
21
 
18
- RUN ./gradlew build -Dquarkus.package.main-class=io.kong.sdk.function.template.QuarkusApp -Dquarkus.native.enabled=true -Dquarkus.profile=prod -Dquarkus.package.jar.enabled=false
22
+ # Make Gradle wrapper executable and download dependencies
23
+ RUN chmod +x gradlew && \
24
+ ./gradlew dependencies --no-daemon --stacktrace
19
25
 
20
- ## Stage 2 : create the docker final image
26
+ # Copy source code (changes most frequently, so copy last)
27
+ COPY --chown=quarkus:quarkus src /code/src
28
+
29
+ # Build native executable with optimizations
30
+ RUN ./gradlew build \
31
+ -Dquarkus.package.main-class=io.kong.sdk.function.template.QuarkusApp \
32
+ -Dquarkus.native.enabled=true \
33
+ -Dquarkus.profile=prod \
34
+ -Dquarkus.package.jar.enabled=false \
35
+ -x test \
36
+ --no-daemon \
37
+ --stacktrace
38
+
39
+ # ==============================================
40
+ # Stage 2: Create minimal runtime image
41
+ # ==============================================
21
42
  FROM quay.io/quarkus/quarkus-micro-image:2.0
22
43
 
44
+ # Copy native executable from build stage
45
+ # Use specific pattern to avoid copying multiple files
23
46
  WORKDIR /work/
24
47
  COPY --from=build /code/build/*-runner /work/application
25
- RUN chmod 775 /work
48
+ RUN chmod 755 /work/application
26
49
 
50
+ # Start the application
27
51
  EXPOSE 8080
28
- CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
52
+ CMD ["./application", "-Dquarkus.http.host=0.0.0.0", "-Dquarkus.http.port=8080"]
@@ -31,9 +31,6 @@ dependencies {
31
31
  implementation("io.quarkus:quarkus-arc")
32
32
  implementation("io.quarkus:quarkus-jackson")
33
33
  implementation("io.quarkus:quarkus-kotlin")
34
- implementation("io.quarkus:quarkus-micrometer-registry-prometheus")
35
- implementation("io.quarkus:quarkus-opentelemetry")
36
- implementation("io.quarkus:quarkus-smallrye-health")
37
34
 
38
35
  testImplementation("io.quarkus:quarkus-junit5")
39
36
  testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesTestVersion")
@@ -4,7 +4,7 @@ kotlin.code.style=official
4
4
  javaVersion=21
5
5
 
6
6
  # kong artifacts
7
- kongSdkVersion=0.0.20-SNAPSHOT
7
+ kongSdkVersion=0.0.21-SNAPSHOT
8
8
  kongVersion=0.0.1-SNAPSHOT
9
9
 
10
10
  # https://mvnrepository.com/artifact/org.jlleitschuh.gradle/ktlint-gradle
@@ -1,13 +1,3 @@
1
1
  quarkus.profile=local
2
2
  quarkus.log.level=INFO
3
3
  quarkus.log.console.format=%d{yyyy-MM-dd'T'HH:mm:ss,SSS} | %-5p | %s thread=%t module=%c{2.} %e%n
4
-
5
- quarkus.otel.enabled=true
6
- quarkus.otel.exporter.otlp.enabled=false
7
- quarkus.http.test-port=8083
8
-
9
-
10
- # non-prod profiles
11
-
12
- %local.quarkus.http.host=0.0.0.0
13
- %local.quarkus.http.port=8080