diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-04-25 20:10:35 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-04-25 20:14:58 +0200 |
| commit | f08a047307f0c381d0f4331283226a243ee3059d (patch) | |
| tree | 5c78dad8d343532b6e7df0101e4fa929b08dbb27 | |
| parent | c853c2e10acdfafee9c6566e9f4f82fba7a9fb9c (diff) | |
build: Adjust docker-compose configuration to flat structure
This change adjusts the docker-compose configuration to support the
re-organized project structure.
| -rw-r--r-- | .dockerignore | 10 | ||||
| -rw-r--r-- | Dockerfile | 17 | ||||
| -rw-r--r-- | docker-compose.yml | 6 |
3 files changed, 30 insertions, 3 deletions
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 <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 :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: |
