summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-runner
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-03-17 11:34:55 +0100
committerFabian Mastenbroek <mail.fabianm@gmail.com>2022-04-04 12:51:40 +0200
commit77d7ffd9a7a33f08109a2db8a35e4094b2761c51 (patch)
treebaf1030bd12f4853984e931ce868e611085c8db7 /opendc-web/opendc-web-runner
parent239990cb16f13cb307a94abccdd688bec2865221 (diff)
refactor(web): Update Docker deployment for new web API
This change updates the Docker deployment configuration for the new web API implemented in Kotlin. The new API migrates to Postgres. Furthermore, with this change, we move the Dockerfiles to their corresponding module.
Diffstat (limited to 'opendc-web/opendc-web-runner')
-rw-r--r--opendc-web/opendc-web-runner/Dockerfile18
1 files changed, 18 insertions, 0 deletions
diff --git a/opendc-web/opendc-web-runner/Dockerfile b/opendc-web/opendc-web-runner/Dockerfile
new file mode 100644
index 00000000..771ed2ed
--- /dev/null
+++ b/opendc-web/opendc-web-runner/Dockerfile
@@ -0,0 +1,18 @@
+FROM openjdk:17-slim
+MAINTAINER OpenDC Maintainers <opendc@atlarge-research.com>
+
+# Obtain (cache) Gradle wrapper
+COPY gradlew /app/
+COPY gradle /app/gradle
+WORKDIR /app
+RUN ./gradlew --version
+
+# Build project
+COPY ./ /app/
+RUN ./gradlew --no-daemon :installDist
+
+FROM openjdk:17-slim
+COPY --from=0 /app/build/install /opt/
+COPY --from=0 /app/traces /opt/opendc/traces
+WORKDIR /opt/opendc
+CMD bin/opendc-web-runner