diff --git a/.github/workflows/docker-compile.yml b/.github/workflows/docker-compile.yml index 56f580c2d..32cf99502 100644 --- a/.github/workflows/docker-compile.yml +++ b/.github/workflows/docker-compile.yml @@ -23,6 +23,14 @@ jobs: images: | ghcr.io/modrinth/knossos docker.io/modrinth/knossos + - + name: Get branch name + id: vars + run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/} + - + name: Get short SHA + id: slug + run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -53,3 +61,5 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} + build-args: | + VERSION_ID=${{ steps.vars.outputs.short_ref }}-${{ steps.slug.outputs.sha8 }} diff --git a/Dockerfile b/Dockerfile index e5781aa1a..3f8d66497 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,25 @@ # Dockerfile FROM node:14.16.0-alpine -# create destination directory -RUN mkdir -p /usr/src/knossos -WORKDIR /usr/src/knossos - # update and install dependency RUN apk update && apk upgrade RUN apk add git +# create destination directory +RUN mkdir -p /usr/src/knossos +WORKDIR /usr/src/knossos + # copy the app, note .dockerignore COPY . /usr/src/knossos/ -RUN npm install +RUN npm ci + +ARG VERSION_ID=unknown + RUN npm run build EXPOSE 3000 + ENV NUXT_HOST=0.0.0.0 ENV NUXT_PORT=3000 diff --git a/components/MFooter.vue b/components/MFooter.vue index ef4e74f3d..b251f2b74 100644 --- a/components/MFooter.vue +++ b/components/MFooter.vue @@ -26,13 +26,18 @@ Twitter - © Guavy LLC + © Guavy LLC
+ Version: {{ version }}