From 9b79c7030e62c6dc4bd874d264641eb37ae382a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20B=C3=B6hlke?= Date: Wed, 25 Sep 2024 15:40:59 +0200 Subject: [PATCH 1/2] Use local autoupdate module code --- Dockerfile | 3 +++ Makefile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4a1c3cc..6f5342a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,9 @@ FROM base as development RUN ["go", "install", "github.com/githubnemo/CompileDaemon@latest"] EXPOSE 9012 +COPY ./openslides-autoupdate-service /openslides-autoupdate-service +RUN echo 'replace github.com/OpenSlides/openslides-autoupdate-service => /openslides-autoupdate-service' >> go.mod +RUN go mod tidy CMD CompileDaemon -log-prefix=false -build="go build" -command="./openslides-vote-service" diff --git a/Makefile b/Makefile index fb4f66e..c867ce9 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ build-dev: + rm -fr openslides-autoupdate-service + cp -r ../openslides-autoupdate-service . docker build . --target development --tag openslides-vote-dev + rm -fr openslides-autoupdate-service run-tests: docker build . --target testing --tag openslides-vote-test From fa518c392f3b305b96f61421dead302299c17bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20B=C3=B6hlke?= Date: Mon, 14 Oct 2024 15:52:29 +0200 Subject: [PATCH 2/2] Change build scripts so that fullstack feature use-case (wiring own libs locally) is optional --- Dockerfile | 8 +++++--- Makefile | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6f5342a..c61fe4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,11 +27,13 @@ FROM base as development RUN ["go", "install", "github.com/githubnemo/CompileDaemon@latest"] EXPOSE 9012 -COPY ./openslides-autoupdate-service /openslides-autoupdate-service -RUN echo 'replace github.com/OpenSlides/openslides-autoupdate-service => /openslides-autoupdate-service' >> go.mod -RUN go mod tidy CMD CompileDaemon -log-prefix=false -build="go build" -command="./openslides-vote-service" +FROM development as development-fullstack + +COPY --from=autoupdate / /openslides-autoupdate-service +RUN echo 'replace github.com/OpenSlides/openslides-autoupdate-service => /openslides-autoupdate-service' >> go.mod && \ + go mod tidy # Productive build FROM scratch diff --git a/Makefile b/Makefile index c867ce9..6489aa8 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ build-dev: - rm -fr openslides-autoupdate-service - cp -r ../openslides-autoupdate-service . docker build . --target development --tag openslides-vote-dev - rm -fr openslides-autoupdate-service + +build-dev-fullstack: + DOCKER_BUILDKIT=1 docker build . --target development-fullstack --build-context autoupdate=../openslides-autoupdate-service --tag openslides-vote-dev-fullstack run-tests: docker build . --target testing --tag openslides-vote-test