kewashi / HousePanel_Legacy

SmartThings and Hubitat smart home web app dashboard
http://www.housepanel.net
GNU General Public License v3.0
49 stars 26 forks source link

docker and docker-compose files #10

Open iderdik opened 5 years ago

iderdik commented 5 years ago

Is there any chance you could provide a dockerfile and docker-compose file with the proper volume mounts for config persistence?

kewashi commented 5 years ago

I have no experience with docker unfortunately so this will have to be on the back burner.

tkdrob commented 5 years ago

@kewashi I would actually like to add this myself. To make a docker container, a dockerfile has to be written. I think I have made some progress with that but libapache2-mod-php is missing from dl-cdn.alpinelinux.org. Any ideas?



# set version label
ARG BUILD_DATE
ARG VERSION
ARG HOUSEPANEL_VERSION
LABEL build_version="Housepanel version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"
# hard set UTC in case the user does not define it
ENV TZ="Etc/UTC"

RUN \
 echo "**** install packages ****" && \
 apk add --no-cache \
    apache2 \
    libapache2-mod-php \
    php \
    php-gd \
    wiringpi \
    raspi-gpio \
    rpi-update \
    curl \
    php5-curl && \
 echo "**** install HousePanel ****" && \
 if [ -z ${HOUSEPANEL_VERSION+x} ]; then \
    HOUSEPANEL_VERSION=$(curl -sX GET "https://api.github.com/repos/kewashi/HousePanel/releases/latest" \
    | awk '/tag_name/{print $4;exit}' FS='[""]'); \
 fi && \
 curl -o \
 /tmp/HousePanel.tar.gz -L \
    "https://github.com/kewashi/HousePanel/archive/${HOUSEPANEL_VERSION}.tar.gz" && \
 mkdir -p \
    /app/housepanel && \
 tar xf \
 /tmp/housepanel.tar.gz -C \
    /app/housepanel --strip-components=1 && \
 rm -Rf /app/housepanel/bin && \
 echo "**** clean up ****" && \
 apk del --purge \
 rm -rf \
    /root/.cache \
    /tmp/*

# add local files
COPY root/ /

# ports and volumes
EXPOSE 80
VOLUME /config
kewashi commented 5 years ago
    Well I would assume you could google it and find it somewhere or search the Apache forum. I have never done a Docker so I am not much help. 

    ________________________Ken Washingtonken@kenw.com

On Wed, Sep 4, 2019 at 4:21 AM -0400, "tkdrob" notifications@github.com wrote:

I would actually like to add this myself. To make a docker container, a dockerfile has to be written. I think I have made some progress with that but libapache2-mod-php is missing from dl-cdn.alpinelinux.org. Any ideas?

set version label

ARG BUILD_DATE ARG VERSION ARG HOUSEPANEL_VERSION LABEL build_version="Housepanel version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="chbmb"

hard set UTC in case the user does not define it

ENV TZ="Etc/UTC"

RUN \ echo " install packages " && \ apk add --no-cache \ apache2 \ libapache2-mod-php \ php \ php-gd \ wiringpi \ raspi-gpio \ rpi-update \ curl \ php5-curl && \ echo " install HousePanel " && \ if [ -z ${HOUSEPANEL_VERSION+x} ]; then \ HOUSEPANEL_VERSION=$(curl -sX GET "https://api.github.com/repos/kewashi/HousePanel/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ curl -o \ /tmp/HousePanel.tar.gz -L \ "https://github.com/kewashi/HousePanel/archive/${HOUSEPANEL_VERSION}.tar.gz" && \ mkdir -p \ /app/housepanel && \ tar xf \ /tmp/housepanel.tar.gz -C \ /app/housepanel --strip-components=1 && \ rm -Rf /app/housepanel/bin && \ echo " clean up " && \ apk del --purge \ rm -rf \ /root/.cache \ /tmp/*

add local files

COPY root/ /

ports and volumes

EXPOSE 80 VOLUME /config

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.