From a01f964b531f12fd89cbdb0f2132aecbfaebf546 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sat, 30 Jul 2022 12:15:10 +0200 Subject: refactor(web/server): Create standalone OpenDC distribution This change updates the Quarkus configuration of the OpenDC web server to serve as a fully standalone distribution that is capable of serving the web UI, web API, and experiment runner. Such an approach vastly simplifies local deployments. For Docker deployments, we create a custom Quarkus profile that uses PostgreSQL and disables the web UI. --- opendc-web/opendc-web-server/Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 opendc-web/opendc-web-server/Dockerfile (limited to 'opendc-web/opendc-web-server/Dockerfile') diff --git a/opendc-web/opendc-web-server/Dockerfile b/opendc-web/opendc-web-server/Dockerfile new file mode 100644 index 00000000..444d787e --- /dev/null +++ b/opendc-web/opendc-web-server/Dockerfile @@ -0,0 +1,17 @@ +FROM openjdk:17-slim +MAINTAINER OpenDC Maintainers + +# Obtain (cache) Gradle wrapper +COPY gradlew /app/ +COPY gradle /app/gradle +WORKDIR /app +RUN ./gradlew --version + +# Build project +COPY ./ /app/ +RUN ./gradlew --no-daemon :opendc-web:opendc-web-server:quarkusBuild -Dquarkus.profile=docker + +FROM openjdk:17-slim +COPY --from=0 /app/opendc-web/opendc-web-server/build/quarkus-app /opt/opendc +WORKDIR /opt/opendc +CMD java -jar quarkus-run.jar -- cgit v1.2.3