From 03b929a0da29ba352d33b7e73288ed8bd18aa98b Mon Sep 17 00:00:00 2001 From: Benjamin Cavy Date: Wed, 25 Dec 2024 17:42:01 +0100 Subject: [PATCH] chore: release demo docker image alongside classical one --- .github/workflows/release.yml | 8 ++++++++ .../Dockerfile-pg-embeded | 2 +- script.sh => demo-docker-image/script.sh | 2 +- manual/docs/06-dev/index.mdx | 7 +++++++ 4 files changed, 17 insertions(+), 2 deletions(-) rename Dockerfile-pg-embeded => demo-docker-image/Dockerfile-pg-embeded (88%) rename script.sh => demo-docker-image/script.sh (72%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d22b8279..1b1440a10 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,3 +64,11 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: maif/izanami:${{ github.event.inputs.releaseVersion }} + - name: Build and push demo image + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + file: {context}/demo-docker-image/Dockerfile-pg-embeded + tags: maif/izanami-test-standalone:${{ github.event.inputs.releaseVersion }} \ No newline at end of file diff --git a/Dockerfile-pg-embeded b/demo-docker-image/Dockerfile-pg-embeded similarity index 88% rename from Dockerfile-pg-embeded rename to demo-docker-image/Dockerfile-pg-embeded index 4949696ce..eb3e1fc76 100644 --- a/Dockerfile-pg-embeded +++ b/demo-docker-image/Dockerfile-pg-embeded @@ -8,7 +8,7 @@ RUN mkdir /app #RUN groupadd -g 10001 javauser && useradd -u 10000 -g javauser javauser ENV IZANAMI_CONTAINERIZED=true COPY ./target/izanami.jar /app/izanami.jar -COPY script.sh /app/script.sh +COPY ./demo-docker-image/script.sh /app/script.sh RUN chmod +x /app/script.sh #WORKDIR /app diff --git a/script.sh b/demo-docker-image/script.sh similarity index 72% rename from script.sh rename to demo-docker-image/script.sh index 43129f365..12d463704 100644 --- a/script.sh +++ b/demo-docker-image/script.sh @@ -3,7 +3,7 @@ echo "Waiting postgres to launch on 5432..." while ! nc -z localhost 5432; do - sleep 0.1 # wait for 1/10 of the second before check again + sleep 0.1 done java -jar /app/izanami.jar \ No newline at end of file diff --git a/manual/docs/06-dev/index.mdx b/manual/docs/06-dev/index.mdx index 8cdbdf076..e8af39f01 100644 --- a/manual/docs/06-dev/index.mdx +++ b/manual/docs/06-dev/index.mdx @@ -137,6 +137,13 @@ To test docker image docker run --env IZANAMI_PG_URI=postgresql://postgres:postgres@host.docker.internal:5432/postgres -p 9000:9000 izanami ``` +To build "test" docker image (docker image with embeded postgres) + +```sh +docker build -f ./demo-docker-image/Dockerfile-pg-embeded . +``` + + ## Running documentation locally To run documentation, just install and start project in `manual` folder.