From f477088404c960f64993ea6dd171764f0c0e5dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxi=20Quo=C3=9F?= Date: Sun, 29 Jan 2023 17:11:36 +0100 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit a506e6fee1c90d2262f25eb680686adbfb3b2be0 Author: Maxi Quoß Date: Sun Jan 29 17:08:40 2023 +0100 update docker commit 445b735b111d4f44710fd93b852a3d0c14ae81d7 Author: Maxi Quoß Date: Sun Jan 29 16:31:46 2023 +0100 dont use v commit fb304053961516b7b24cd20a6fe6588b13124834 Author: Maxi Quoß Date: Sun Jan 29 16:30:51 2023 +0100 dont use v commit 49cf2b2607c03b1b9c00101a40c377588670c153 Author: Maxi Quoß Date: Sun Jan 29 16:23:31 2023 +0100 try tag commit 57bef8bb7e686ca1478c9fb82b030ebdae754e71 Author: Maxi Quoß Date: Sun Jan 29 16:10:28 2023 +0100 rawversion commit 51e071bf225eb1f898747508a418565a1c75aebd Author: Maxi Quoß Date: Sun Jan 29 15:58:48 2023 +0100 try again with v commit 4ce90f1f5f3112fb2ada077bac9b98ab9fe57189 Author: Maxi Quoß Date: Sun Jan 29 15:54:10 2023 +0100 try again with v commit 6fd289e1a7f1479f4d853a5b629997b7c518748e Author: Maxi Quoß Date: Sun Jan 29 15:47:56 2023 +0100 workflow: tags commit 8e7d4e814f4acbdf5d90d58e79857330eff5b18f Author: Maxi Quoß Date: Sun Jan 29 15:37:54 2023 +0100 workflow: env is broken commit eb311bf2890aa8aeba5a9e8e14eeb5ea538d3e1e Author: Maxi Quoß Date: Sun Jan 29 15:30:44 2023 +0100 workflow: env commit fea958c4fc131be021d0c0a5d6c00005992278a9 Author: Maxi Quoß Date: Sun Jan 29 15:26:54 2023 +0100 workflow: env commit 8f59fb448ff599d3a1bec4f139999c0b5197c6c8 Author: Maxi Quoß Date: Sun Jan 29 15:22:46 2023 +0100 workflow: env commit e303e7af64a3244047a796059e399a3a579e751a Author: Maxi Quoß Date: Sun Jan 29 15:20:43 2023 +0100 workflow: docker meta image name commit d47c21c3dbc8892aebf8147a2dc2c9e9a31932dd Author: Maxi Quoß Date: Sun Jan 29 15:15:03 2023 +0100 docker: fix unzip commit 4eb1c98729d5a9bf5ac87c39d0ccd82d26d60ba5 Author: Maxi Quoß Date: Sun Jan 29 15:05:48 2023 +0100 docker: unzip -q commit fe042e00039d6cd76a8bb050118c208d0293339d Author: Maxi Quoß Date: Sun Jan 29 14:58:12 2023 +0100 workflow: remove v from version commit dd4bc6c1e7eb635072c6862c7df90c18316edf1e Author: Maxi Quoß Date: Sun Jan 29 14:54:19 2023 +0100 workflow: fix url commit 5ee9b43aff30f4f76602f888dcffebad2e4ad6f9 Author: Maxi Quoß Date: Sun Jan 29 14:49:08 2023 +0100 workflow: remove v commit 9d598b4c096da0dcd53bfded24b903bbfb122d74 Author: Maxi Quoß Date: Sun Jan 29 14:46:01 2023 +0100 event tag --- .github/workflows/deploy.yml | 7 ++++--- Dockerfile | 9 +++++---- backend/.goreleaser.yaml | 2 +- docker-compose.yml | 11 +++++++++-- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6750b41d..f32f9201 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,7 +3,7 @@ name: Deploy release on: push: tags: - - "v3.*.*" + - "3.*.*" workflow_dispatch: jobs: @@ -60,10 +60,11 @@ jobs: uses: docker/metadata-action@v4 with: images: | - name/app + ghcr.io/seriousm4x/UpSnap tags: | - type=ref,event=push tag + type=ref,event=tag type=semver,pattern={{version}} + type=semver,pattern={{major}} type=semver,pattern={{major}}.{{minor}} # qemu diff --git a/Dockerfile b/Dockerfile index db8a9e99..6aaeb5a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,13 +5,14 @@ ARG TARGETVARIANT ARG VERSION ENV BUILDX_ARCH="${TARGETOS:-linux}_${TARGETARCH:-amd64}${TARGETVARIANT}" WORKDIR /app -RUN wget https://github.com/seriousm4x/upsnap/releases/download/v${VERSION}/upsnap_${VERSION}_${BUILDX_ARCH}.zip &&\ - unzip upsnap_${VERSION}_${BUILDX_ARCH}.zip &&\ - chmod +x /upsnap +RUN wget https://github.com/seriousm4x/UpSnap/releases/download/${VERSION}/UpSnap_${VERSION}_${BUILDX_ARCH}.zip &&\ + unzip UpSnap_${VERSION}_${BUILDX_ARCH}.zip &&\ + rm -f UpSnap_${VERSION}_${BUILDX_ARCH}.zip &&\ + chmod +x upsnap FROM alpine:3 RUN apk update &&\ - apk add --no-cache ca-certificates nmap samba-common-tools &&\ + apk add --no-cache tzdata ca-certificates nmap samba-common-tools &&\ rm -rf /var/cache/apk/* WORKDIR /app COPY --from=downloader /app/upsnap upsnap diff --git a/backend/.goreleaser.yaml b/backend/.goreleaser.yaml index 966f3424..bf6fb948 100644 --- a/backend/.goreleaser.yaml +++ b/backend/.goreleaser.yaml @@ -1,5 +1,5 @@ release: - draft: true + # draft: true prerelease: auto before: hooks: diff --git a/docker-compose.yml b/docker-compose.yml index 8ca7bc4b..0466e99e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,18 @@ version: "3" services: upsnap: - image: ghcr.io/seriousm4x/UpSnap + image: ghcr.io/seriousm4x/upsnap:3 network_mode: host - command: ["./upsnap", "serve", "--http", "0.0.0.0:8090"] + volumes: + - ./data:/app/pb_data healthcheck: test: wget --no-verbose --tries=1 --spider http://localhost:8090/api/health || exit 1 interval: 1m timeout: 10s retries: 3 + # environment: + # - TZ=Europe/Berlin + # - UPSNAP_INTERVAL=@every 10s + # - UPSNAP_SCAN_RANGE=192.168.1.0/24 + # - UPSNAP_WEBSITE_TITLE=Custom name + # command: ["./upsnap", "serve", "--http", "0.0.0.0:8090"]