From f08a047307f0c381d0f4331283226a243ee3059d Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 25 Apr 2021 20:10:35 +0200 Subject: build: Adjust docker-compose configuration to flat structure This change adjusts the docker-compose configuration to support the re-organized project structure. --- .dockerignore | 10 ++++++++++ Dockerfile | 17 +++++++++++++++++ docker-compose.yml | 6 +++--- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..c4627e72 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +.git + +.idea/ +**/out +*.iml +.idea_modules/ + +.gradle +**/build +**/node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..d103788d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM openjdk:15-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-runner:installDist + +FROM openjdk:15-slim +COPY --from=0 /app/opendc-web/opendc-web-runner/build/install /app +WORKDIR /app +CMD opendc-web-runner/bin/opendc-web-runner diff --git a/docker-compose.yml b/docker-compose.yml index 45a961fe..982f2ed8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.8" services: frontend: build: - context: ./frontend + context: opendc-web/opendc-web-ui args: OPENDC_OAUTH_CLIENT_ID: ${OPENDC_OAUTH_CLIENT_ID} OPENDC_FRONTEND_SENTRY_DSN: ${OPENDC_FRONTEND_SENTRY_DSN} @@ -12,7 +12,7 @@ services: - backend api: - build: ./api + build: opendc-web/opendc-web-api image: api restart: on-failure networks: @@ -33,7 +33,7 @@ services: - SENTRY_ENVIRONMENT simulator: - build: ./simulator + build: . image: simulator restart: on-failure networks: -- cgit v1.2.3