Moved dockerfile and fixed addon build.
All checks were successful
homepanel/HomePanel/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-02-15 20:32:16 +00:00
parent f40a1a6ced
commit 292f6ce4aa
3 changed files with 11 additions and 20 deletions

View File

@ -1,15 +1,12 @@
# Home Panel Dockerfile
# Supports both Home Assistant Add-on mode and standalone Docker
# Supports both Home Assistant Add-on and standalone Docker
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-dockerfile
# For Home Assistant addon: BUILD_FROM is provided by HA build system
# For standalone: defaults to Node.js 20 Alpine
ARG BUILD_FROM=node:20-alpine
FROM $BUILD_FROM
FROM ${BUILD_FROM}
# Install pnpm and curl (for healthcheck)
RUN npm install -g pnpm && \
(which curl || apk add --no-cache curl 2>/dev/null || apt-get update && apt-get install -y curl || true)
# Install pnpm
RUN npm install -g pnpm
# Set working directory
WORKDIR /app
@ -32,12 +29,10 @@ RUN pnpm --filter client build
# Create data directory
RUN mkdir -p /data
# Copy root filesystem (run script for HA addon mode)
# Copy root filesystem (for HA addon mode)
COPY addon/rootfs /
# Environment variables
# HOMEPANEL_ADDON_MODE: set to 'true' when running as HA addon (auto-detected by rootfs/run script)
# For standalone mode, these can be overridden
ENV NODE_ENV=production
ENV PORT=8099
@ -46,10 +41,7 @@ LABEL \
io.hass.name="Home Panel" \
io.hass.description="A customizable dashboard for Home Assistant" \
io.hass.type="addon" \
io.hass.version="1.0.0" \
org.opencontainers.image.title="Home Panel" \
org.opencontainers.image.description="A customizable dashboard for Home Assistant" \
org.opencontainers.image.source="https://github.com/tombutcher/HomePanel"
io.hass.version="1.0.0"
# Expose port
EXPOSE 8099
@ -58,6 +50,5 @@ EXPOSE 8099
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8099/api/verify || exit 1
# Default command for standalone mode
# When running as HA addon, the rootfs/run script is used instead
# Default command (used for standalone; HA addon uses rootfs/run script)
CMD ["node", "packages/server/index.js"]

View File

@ -12,7 +12,7 @@ Home Panel is a customizable dashboard for Home Assistant. It can run as:
```bash
# Build the image
docker build -t homepanel -f addon/Dockerfile .
docker build -t homepanel .
# Run the container
docker run -d \
@ -30,9 +30,7 @@ Access the dashboard at `http://localhost:8099`
version: '3.8'
services:
homepanel:
build:
context: .
dockerfile: addon/Dockerfile
build: .
ports:
- "8099:8099"
volumes:

View File

@ -1,6 +1,8 @@
# Home Panel Add-on Build Configuration
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-dockerfile
dockerfile: ../Dockerfile
build_from:
aarch64: "ghcr.io/home-assistant/aarch64-base-nodejs:20"
amd64: "ghcr.io/home-assistant/amd64-base-nodejs:20"