dashticz and docker

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

dashticz and docker

Post by pvklink »

Hi, i have all my components working with one compose file and dockerfiles

The dashticz part is below.After building an new image, i still get "there is a new version 3.8.2" when i execute the dashticz docker.
I thougt that by delete the old container and image and creating it again, this problem is solved.. but still getting it...
After execute the below procedure i have 3.8.0, and not 3.8.2


docker-compose.yml

Code: Select all

 dashticz:
    container_name: dashticz
    build: /home/pi/pvkmenu/IOTstack/services/dashticz/.
    #context: .   
    restart: always
    ports:
      - "80:80"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - type: bind
        source: /home/pi/pvkmenu/IOTstack/volumes/dashticz/
        target: /var/www/html/
dockerfile

Code: Select all

FROM php:7.4-apache
ARG tz="Europe/Amsterdam" 
RUN printf "[PHP]\ndate.timezone = $tz\n" > /usr/local/etc/php/conf.d/tzone.ini && \
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
RUN apt update && apt install git -y
RUN echo "if [ ! -f /var/www/html/version.txt ]; then git clone --depth 1 --branch beta  https://github.com/Dashticz/dashticz /var/www/html; chmod -R a+rw /var/www/html/custom; chmod -R a+rw /var/www/html/img;fi; apache2-foreground" > /usr/bin/init.sh && chmod +x /usr/bin/init.sh 
CMD ["/usr/bin/init.sh"]
SHELL ["/bin/bash", "-c"]
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dashticz and docker

Post by Lokonli »

Dashticz is installed in the bind folder in /home/pi/pvkmenu/IOTstack/volumes/dashticz

If the file version.txt already exists, then Dashticz is not overwritten with a new version.

To update Dashticz there are two methods:

1)
Execute 'git pull' in the Dashticz folder (most easy)

2)
remove version.txt from the Dashticz folder, remove Dashticz Docker container and Docker image followed by docker_compose up

Note:
This is only applicable when using the docker-compose-yml and dockerfile from the previous post. The dockerfile used by the automatic install, which can be found on Github as well, works differently. In that case use git pull to update.
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: dashticz and docker

Post by pvklink »

Thanks!

I tried method 1, the easiest

pi@raspberrypi:~/pvkmenu/IOTstack/volumes/dashticz $ git pull
error: cannot open .git/FETCH_HEAD: Toegang geweigerd

pi@raspberrypi:~/pvkmenu/IOTstack/volumes/dashticz $ sudo git pull
Updating e3c47f5..0c38431
error: Your local changes to the following files would be overwritten by merge:
dist/bundle.js
docs/blocks/specials/dial.rst
docs/blocks/specials/weather.rst
docs/dashticzconfiguration.rst
docs/releasenotes/releasenotes.rst
docs/screens.rst
index.html
index2.html
js/components/simpleblock.js
js/dashticz.js
js/dt_function.js
js/main.js
js/settings.js
lang/bs_BA.json
lang/ca_ES.json
lang/cs_CZ.json
lang/da_DK.json
lang/de_DE.json
lang/en_US.json
lang/es_ES.json
lang/fi_FI.json
lang/fr_FR.json
lang/hu_HU.json
lang/it_IT.json
lang/ja_JP.json
lang/lt_LT.json
lang/nb_NO.json
lang/nl_NL.json
lang/nn_NO.json
lang/pl_PL.json
lang/pt_PT.json
lang/ro_RO.json
lang/ru_RU.json
lang/sk_SK.json
lang/sl_SI.json
lang/sr_RS.json
lang/sv_SE.json
lang/tr_TR.json
lang/uk_UA.json
lang/zh_CN.json
package-lock.json
package.json
src/index.js
themes/white/white.css
version.txt
Please commit your changes or stash them before you merge.
Aborting
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: dashticz and docker

Post by pvklink »

@update
i did a
- sudo git reset --hard
and then a
- sudo git pull

and now i have the latest version!
Is this the right way ? , or do i loose 'own' addons (custom folders, extra images like png/etc) with this approach ?
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dashticz and docker

Post by Lokonli »

You will loose changed files, not new files I expect.


Verstuurd vanaf mijn AC2003 met Tapatalk

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest