-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from lokonli/master-305
Master 305
- Loading branch information
Showing
43 changed files
with
1,776 additions
and
1,013 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ | |
/custom_2/CONFIG_DEFAULT.js | ||
/node_modules/ | ||
/docs/_build | ||
Makefile.ini | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,5 @@ | ||
# Dockerfile for Dashticz | ||
FROM nginx | ||
|
||
# See http://nelkinda.com/blog/apache-php-in-docker/ | ||
FROM php:apache | ||
USER root | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y nginx --no-install-recommends | ||
|
||
# Remove the default Nginx configuration file | ||
RUN rm -v /etc/nginx/nginx.conf | ||
|
||
# Copy a configuration file from the current directory | ||
COPY nginx.conf /etc/nginx/ | ||
|
||
RUN rm -rf /usr/share/nginx/html/ | ||
|
||
# Append "daemon off;" to the beginning of the configuration | ||
RUN echo "daemon off;" >> /etc/nginx/nginx.conf | ||
|
||
# Expose ports | ||
EXPOSE 90 | ||
|
||
# Set the default command to execute | ||
# when creating a new container | ||
CMD service nginx start | ||
SHELL ["/bin/bash", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
-include Makefile.ini | ||
PORT?=8082 | ||
APP?=dtv3-$(PORT) | ||
|
||
.PHONY: help | ||
help: | ||
@echo "Installation script" | ||
@echo "make help : Show this info" | ||
@echo "make start : Build Dashticz container and start it on port 8082" | ||
@echo " Parameters: " | ||
@echo " PORT=<port> : Build Dashticz container and start in on the provided port" | ||
@echo "make stop : Stop the Domoticz container" | ||
@echo | ||
@echo "make update : Update Dashticz to the latest version from Github" | ||
@echo "make beta : Switch to the beta branch" | ||
@echo "make master : Switch to the master branch" | ||
|
||
testdocker: | ||
ifeq (, $(shell which docker)) | ||
@echo "Let's install docker first" | ||
wget -qO- https://get.docker.com/ | sh | ||
endif | ||
|
||
|
||
testgit: | ||
ifeq (, $(shell which git)) | ||
@echo "Installing git ..." | ||
sudo apt-get install git | ||
endif | ||
|
||
testport: | ||
ifeq ($(shell ss -ln src :$(PORT) | grep -Ec -e "\<$(PORT)\>"),0) | ||
else | ||
@echo | ||
@echo "PORT is defined in Makefile.ini as $(PORT)" | ||
@echo "This port already is in use" | ||
@echo "Please use a different port." | ||
@echo "Then restart via: make start" | ||
@echo | ||
@exit 201 | ||
endif | ||
|
||
.PHONY: start | ||
start: testdocker testgit | ||
@echo "Checking container $(APP)" | ||
#ifeq ($(strip shell sudo docker image -q $(APP)),) | ||
ifeq ($(shell sudo docker ps -q -a -f NAME=$(APP) ),) | ||
@echo "Checking port $(PORT)" | ||
|
||
ifeq ($(shell ss -ln src :$(PORT) | grep -Ec -e "\<$(PORT)\>"),0) | ||
sudo docker build -t $(APP) . | ||
sudo docker run --name $(APP) -d -p $(PORT):80 --mount type=bind,source="$(CURDIR)",target=/var/www/html $(APP) | ||
@echo | ||
@echo "Dashticz is running at:" | ||
@printf "http://%s:`sudo docker inspect -f '{{ (index (index .NetworkSettings.Ports "80/tcp") 0).HostPort }}' $(APP)`\n" `hostname -I | grep -Po '\b(?:\d{1,3}\.){3}\d{1,3}\b'` | ||
else | ||
@echo | ||
@echo "Port $(PORT) already is in use." | ||
@echo "If you want to rebuild run the following command first: make stop" | ||
@echo "or edit Makefile.ini with a new port and retry via: make start" | ||
@echo | ||
|
||
endif | ||
else | ||
@echo | ||
@echo "The Docker container $(APP) for Dashticz already exists" | ||
@echo "If you want to rebuild run the following command first: make stop" | ||
@echo "or edit Makefile.ini with a new name for APP and retry via: make start" | ||
@echo | ||
endif | ||
|
||
|
||
.PHONY: stop | ||
stop: | ||
@echo "Cleaning up $(APP)" | ||
ifeq ($(shell sudo docker ps -q -a -f NAME=$(APP) ),) | ||
#container doesn exist | ||
@echo "Container $(APP) non existing" | ||
else | ||
@echo "Container $(APP) exists" | ||
ifeq (true, $(shell sudo docker inspect -f '{{.State.Running}}' $(APP) 2>/dev/null)) | ||
#container is running | ||
sudo docker stop $(APP) | ||
endif | ||
sudo docker rm $(APP) | ||
endif | ||
|
||
|
||
.PHONY: dockerinstall | ||
dockerinstall: | ||
echo installing docker | ||
sudo apt-get install docker.io | ||
|
||
.PHONY: logs | ||
logs: | ||
sudo docker container logs $(APP) | ||
|
||
.PHONY: login | ||
login: | ||
sudo docker exec -it $(APP) bash | ||
|
||
.PHONY: status | ||
status: | ||
sudo docker ps -f name=$(APP) | ||
|
||
.PHONY: update | ||
update: | ||
git pull | ||
|
||
.PHONY: master | ||
master: | ||
git checkout master | ||
|
||
.PHONY: beta | ||
beta: | ||
git checkout master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
# Dashticz v3 | ||
Alternative dashboard for Domoticz | ||
# Dashticz | ||
Alternative dashboard for Domoticz. | ||
|
||
Fork from Dashticz v2. | ||
The Dashboard of Domoticz is quite powerful. The disadvantage is that it's only possible to show information known in Domoticz. | ||
There is where Dashticz steps in. Dashticz is able to show (almost) all Domoticz information. | ||
In addition to that it's possible to show information from all kind of other sources. | ||
|
||
# Screenshots | ||
![alt tag](http://i.imgur.com/9DBcpNd.jpg) | ||
|
||
# Installation instructions | ||
See https://dashticz.readthedocs.io/en/latest/gettingstarted/ | ||
|
||
# Documentation and support | ||
Documentation can be found on: | ||
https://dashticz-v3.readthedocs.io | ||
https://dashticz.readthedocs.io | ||
|
||
For additional information and support please visit the Dashticz forum: | ||
https://www.domoticz.com/forum/viewforum.php?f=67 | ||
|
||
**Additional info** | ||
|
||
This currently is the active Dashticz repository. Previous repositories (dashticz/dashticz_v2 and dashticzv3/dashticz_v3) will not be updated anymore. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.