From ad6fc3e2dd5d99b6e5b1abc28801b2d7801b5e3b Mon Sep 17 00:00:00 2001 From: Tudor Amariei Date: Wed, 25 Oct 2023 14:02:02 +0300 Subject: [PATCH] add version --- .github/workflows/build.yml | 2 +- docker/dockerfiles/Dockerfile.backend | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1adee099..ce44906d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: images: ghcr.io/code4romania/seismic-risc-backend context: ./ dockerfile: ./docker/dockerfiles/Dockerfile.backend - platform: linux/amd64 + platform: linux/amd64,linux/arm64 registry: ghcr.io secrets: username: ${{ github.actor }} diff --git a/docker/dockerfiles/Dockerfile.backend b/docker/dockerfiles/Dockerfile.backend index 0c223dc4..ad28fa54 100644 --- a/docker/dockerfiles/Dockerfile.backend +++ b/docker/dockerfiles/Dockerfile.backend @@ -37,7 +37,6 @@ ENV IS_CONTAINERIZED=True ENV DEBIAN_FRONTEND=noninteractive - RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ @@ -72,6 +71,13 @@ COPY ./api . # Make sure scripts in .local are usable: ENV PATH=/root/.local/bin:$PATH + +# Set the version and revision of the build: +ARG VERSION +ARG REVISION +RUN echo "$VERSION (${REVISION:0:7})" > /var/www/.version + + # activate the virtualenv: RUN . "${VIRTUAL_ENV}/bin/activate"