From f520de5919ce03a301579d23a21ac44bdd3a062e Mon Sep 17 00:00:00 2001 From: Achim Kramer Date: Fri, 8 Nov 2024 15:44:17 +0100 Subject: [PATCH] Add Dockerfile and docker-compose for vc-web hosting --- Dockerfile | 21 +++++++++++++++++++++ docker-compose.yml | 7 +++++++ 2 files changed, 28 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a7272d9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# @see https://github.com/1EdTech/digital-credentials-public-validator/tree/main +# Developer: Tested with Java 17 and Maven 3.8.6 +FROM maven:3.8.6-openjdk-11-slim + +# Define application dir +WORKDIR /app + +# Copy sourcecode into application dir +COPY . /app + +# Use maven to build the application +RUN mvn clean verify + +# Expose network ports +EXPOSE 8080 + +# We want to start web service +WORKDIR /app/inspector-vc-web + +# Start web application +ENTRYPOINT ["mvn", "spring-boot:run"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4bf06b4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +services: + validator: + build: + context: ./ + dockerfile: Dockerfile + ports: + - "8080:8080" \ No newline at end of file