From a8d081512bd3b3339a24812801bba289748ad470 Mon Sep 17 00:00:00 2001 From: Piotr Antosik Date: Sat, 7 Mar 2026 22:19:20 +0100 Subject: [PATCH 1/2] DX improvements and updated --- .../{docker-publish.yml => release.yml} | 29 +++++----------- README.md | 33 ++++--------------- docker-compose.local.yml | 16 +++++++++ docker-compose.yml | 25 +++++++------- 4 files changed, 43 insertions(+), 60 deletions(-) rename .github/workflows/{docker-publish.yml => release.yml} (60%) create mode 100644 docker-compose.local.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/release.yml similarity index 60% rename from .github/workflows/docker-publish.yml rename to .github/workflows/release.yml index 850d937..41585d3 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/release.yml @@ -1,14 +1,11 @@ -name: Build and Publish Docker Image +name: Build and Publish Release on: - push: - branches: [ master, main ] - workflow_dispatch: + release: + types: [published] env: REGISTRY_GHCR: ghcr.io - # Replace 'your-dockerhub-username' with your actual Docker Hub ID - DOCKERHUB_REPO: brianhumlicek/${{ github.event.repository.name }} jobs: build-and-push: @@ -27,7 +24,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - # 1. Login to GitHub Container Registry - name: Log in to GHCR uses: docker/login-action@v3 with: @@ -35,27 +31,18 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - # 2. Login to Docker Hub (Add your secrets first!) - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - # 3. Extract metadata for BOTH registries - name: Extract metadata (tags, labels) id: meta uses: docker/metadata-action@v5 with: images: | ${{ env.REGISTRY_GHCR }}/${{ github.repository }} - ${{ env.DOCKERHUB_REPO }} tags: | - type=ref,event=branch - type=sha - type=raw,value=latest,enable={{is_default_branch}} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=raw,value=latest - # 4. Build once and push to both - name: Build and push Docker image uses: docker/build-push-action@v5 with: @@ -64,6 +51,8 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max build-args: | GITHUB_SHA=${{ github.sha }} GITHUB_RUN_NUMBER=${{ github.run_number }} diff --git a/README.md b/README.md index 790b55a..821b5eb 100644 --- a/README.md +++ b/README.md @@ -17,36 +17,13 @@ A real-time web portal for monitoring and controlling DSC PowerSeries NEO alarm ### Docker Compose (Recommended) -1. Create a `docker-compose.yml` file: - -```````` -version: '3.4' - -services: - NeoHub: - image: ghcr.io/brianhumlicek/NeoHub:latest - container_name: NeoHub - ports: - - "5181:8080" # HTTP Web UI - - "7013:8443" # HTTPS Web UI - - "3072:3072" # Panel ITv2 connection - volumes: - - NeoHub:/app/persist - restart: unless-stopped - -volumes: - NeoHub_persist: -```````` - -2. Create a `userSettings.json` file (see [Configuration](#-configuration) below) - -3. Start the container: +1. Start the container using the included `docker-compose.yml`: ```````` docker-compose up -d ```````` -4. Access the UI at `http://localhost:5181` or `https://localhost:7013` +2. Access the UI at `http://localhost:5181` or `https://localhost:7013` ### Docker Run @@ -283,7 +260,11 @@ Program the following tags in section **[851]** for your chosen integration slot ### Local Development -```````` +The repository includes `docker-compose.local.yml` for building and running the image from source instead of pulling from GHCR. + +``` +docker-compose -f docker-compose.local.yml up -d --build +``` --- diff --git a/docker-compose.local.yml b/docker-compose.local.yml new file mode 100644 index 0000000..73440f9 --- /dev/null +++ b/docker-compose.local.yml @@ -0,0 +1,16 @@ +services: + NeoHub: + build: + context: . + dockerfile: Dockerfile + container_name: NeoHub + ports: + - "5181:8080" # HTTP Web UI + - "7013:8443" # HTTPS Web UI + - "3072:3072" # Panel ITv2 connection + volumes: + - NeoHub:/app/persist + restart: unless-stopped + +volumes: + NeoHub: diff --git a/docker-compose.yml b/docker-compose.yml index 075a038..9be2e20 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,14 @@ -version: '3.8' - services: - neohub: - image: ghcr.io/brianhumlicek/neohub:latest - container_name: neohub + NeoHub: + image: "ghcr.io/brianhumlicek/neohub:latest" + container_name: NeoHub ports: - - "8080:5181" - - "8443:8181" - - "3072:3072" - environment: - - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://+:8080 - - EnableHttps=false + - "5181:8080" # HTTP Web UI + - "7013:8443" # HTTPS Web UI + - "3072:3072" # Panel ITv2 connection volumes: - - ./persist:/app/persist - restart: unless-stopped \ No newline at end of file + - NeoHub:/app/persist + restart: unless-stopped + +volumes: + NeoHub: From 2929563439812299d15a9288621a1e5cead3b167 Mon Sep 17 00:00:00 2001 From: Piotr Antosik Date: Mon, 9 Mar 2026 13:21:12 +0100 Subject: [PATCH 2/2] fix invalid docker service name --- docker-compose.local.yml | 4 ++-- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.local.yml b/docker-compose.local.yml index 73440f9..414325d 100644 --- a/docker-compose.local.yml +++ b/docker-compose.local.yml @@ -1,9 +1,9 @@ services: - NeoHub: + neohub: build: context: . dockerfile: Dockerfile - container_name: NeoHub + container_name: NeoHub_local ports: - "5181:8080" # HTTP Web UI - "7013:8443" # HTTPS Web UI diff --git a/docker-compose.yml b/docker-compose.yml index 9be2e20..e203692 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ services: - NeoHub: + neohub: image: "ghcr.io/brianhumlicek/neohub:latest" container_name: NeoHub ports: