From 13e96756714a31d3a2a809d657514741b883d150 Mon Sep 17 00:00:00 2001 From: dylan Date: Wed, 29 Jan 2025 20:20:39 +0100 Subject: [PATCH] Create README and Dockerfile but not working because of Flyway migrations. TODO: run in Testcontainers --- Dockerfile | 23 +++++++++++++++++++++++ README.md | 11 +++++++++++ 2 files changed, 34 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..25e854b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM ghcr.io/graalvm/jdk-community:23 AS build + +WORKDIR /app + +COPY pom.xml . + +COPY mvnw . +COPY .mvn ./.mvn + +COPY src ./src +COPY openapi.yml . + +RUN ./mvnw -Pnative native:compile + +FROM alpine + +WORKDIR /app + +COPY --from=build /app/target/swisssign-challenge /app/swisssign-challenge + +EXPOSE 8080 + +CMD ["./swisssign-challenge"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..0559568 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# SwisssignChallenge + +## Requirements + +- [GraalVM 23](https://www.graalvm.org/) + +## Build native executable + +1. Make sure your `JAVA_HOME` or `GRAALVM_HOME` environment variable is correctly +pointing to your JDK. +1. Run `./mvnw -Pnative native:compile`. \ No newline at end of file