help with dashticz docker
Posted: Tuesday 19 October 2021 17:01
I have all my software running with docker containers(10) with one docker-compose...
But with the last releases of dashticz i cant get this working anymore for dashticz..
So i remove the docker stuff for apache, php and dashticz and did this part the old way:
sudo apt-get update -y
sudo apt-get install apache2 php php-xml php-curl libapache2-mod-php
sudo chmod 777 $homevolumes/dashticz
sudo ln -s $homevolumes/dashticz/ /var/www/html
sudo systemctl restart apache2
The above config works with my general dashticz volume (git) on /home/pi/pvkmenu/volumes/dashticz...
All the other docker stuff works great with a large docker-compose file and volumes!
I like to have apache and php also with docker in the above compose structure and remove the old manual apache and php install on the rpi!
So i took a fragment of my compose file (below) and dockerfiles. This setup works for domoticz and dashticz gives an error.
Thats strange because the dashticz volume is the same git download and adjustments i used with the described old way...
QUESTION: what am i doing wrong with my compose part/dockerfile part
Because the volume part must be ok, as it is working with the old non-docker setip
I start the website with
http://192.168.20.38:8084/index.html and get a dashticz ERROR
docker-compose file
dockerfile dashticz( i took from the git pull folder)
But with the last releases of dashticz i cant get this working anymore for dashticz..
So i remove the docker stuff for apache, php and dashticz and did this part the old way:
sudo apt-get update -y
sudo apt-get install apache2 php php-xml php-curl libapache2-mod-php
sudo chmod 777 $homevolumes/dashticz
sudo ln -s $homevolumes/dashticz/ /var/www/html
sudo systemctl restart apache2
The above config works with my general dashticz volume (git) on /home/pi/pvkmenu/volumes/dashticz...
All the other docker stuff works great with a large docker-compose file and volumes!
I like to have apache and php also with docker in the above compose structure and remove the old manual apache and php install on the rpi!
So i took a fragment of my compose file (below) and dockerfiles. This setup works for domoticz and dashticz gives an error.
Thats strange because the dashticz volume is the same git download and adjustments i used with the described old way...
QUESTION: what am i doing wrong with my compose part/dockerfile part
Because the volume part must be ok, as it is working with the old non-docker setip
I start the website with
http://192.168.20.38:8084/index.html and get a dashticz ERROR
docker-compose file
Code: Select all
version: '3.6'
services:
domoticz:
container_name: domoticz
build:
context: /home/pi/pvkmenu/services/domoticz/.
ports:
- "82:8080"
- "444:443"
depends_on:
- mosquitto
- '/dev/ttyUSB0:/dev/ttyUSB0'
- '/dev/ttyUSB1:/dev/ttyUSB1'
- '/dev/ttyACM0:/dev/ttyACM0'
volumes:
- "/home/pi/pvkmenu/volumes/domoticz/data:/opt/domoticz/userdata"
- "/var/run/docker.sock:/var/run/docker.sock"
restart: unless-stopped
network_mode: bridge
environment:
- PUID=1000
- PGID=1000
- LOG_PATH=/opt/domoticz/userdata/domoticz.log
dashticz:
container_name: dashticz
build:
context: /home/pi/pvkmenu/services/dashticz/.
restart: always
depends_on:
- domoticz
ports:
- "8084:80"
volumes:
- /etc/localtime:/etc/localtime:ro
- type: bind
source: /home/pi/pvkmenu/volumes/dashticz/
target: /var/www/html/
# Dockerfile for Dashticz
# See http://nelkinda.com/blog/apache-php-in-docker/
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 printf "[PHP]\ndate.timezone = $tz\n" > /usr/local/etc/php/conf.d/tzone.ini
SHELL ["/bin/bash", "-c"]