Is it possible to include the install of dashticz, apache/php or ngninx fully by docker compose and a dockerfile ?
i tried to make a start with the 2 files (abd more dockerfiles for the rest)
( i already have the latest domoticz, mqtt and node-red working by docker)
Code: Select all
version: '3.6'
services:
domoticz:
container_name: domoticz
build: ./services/domoticz/.
#image: domoticz/domoticz:latest
ports:
- "82:8080"
- "6144:6144"
- "1443:1443"
- "9000:9000"
devices:
- '/dev/ttyUSB0:/dev/ttyUSB0'
volumes:
- ./volumes/domoticz/data:/opt/domoticz/userdata
restart: unless-stopped
network_mode: bridge
environment:
- PUID=1000
- PGID=1000
#- LOG_PATH=/opt/domoticz/userdata/domoticz.log
dashticz:
container_name: dashticz
build: ./services/dashticz/.
ports:
- "90:90"
volumes:
- ./volumes/dashticz:/opt/????
restart: unless-stopped
network_mode: bridge
mosquitto:
container_name: mosquitto
image: eclipse-mosquitto
restart: unless-stopped
user: "1000"
ports:
- "1883:1883"
volumes:
- ./volumes/mosquitto/data:/mosquitto/data
- ./volumes/mosquitto/log:/mosquitto/log
- ./volumes/mosquitto/pwfile:/mosquitto/pwfile
- ./volumes/mosquitto:/mosquitto/config:ro
network_mode: bridge
nodered:
container_name: nodered
build: ./services/nodered/.
restart: unless-stopped
user: "0"
privileged: true
environment:
- TZ=Etc/UTC
ports:
- "1880:1880"
volumes:
- "./volumes/nodered/data:/data"
- "/var/run/docker.sock:/var/run/docker.sock"
- "/var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket"
devices:
- "/dev/gpiomem:/dev/gpiomem"
- "/dev/ttyAMA0:/dev/ttyAMA0"
- "/dev/vcio:/dev/vcio"
networks:
- iotstack_nw
logging:
options:
max-size: 5m
max-file: "3"
networks:
iotstack_nw:
name: IOTstack_Net
# external: true
driver: bridge
ipam:
driver: default
config:
- subnet: 10.77.60.0/24
Code: Select all
# Dockerfile for Dashticz
FROM nginx
USER root
RUN apt-get update
RUN apt-get install -y nginx --no-install-recommends
RUN apt-get install git
# 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