Hi everyone,
I have a Docker Compose addon on an OMV server.
My problem is that I can’t manage to link volumes that I need in several containers.
After I had the Docker Compose plugin running, I set up the following containers.
But my problem is that I can’t see the Openhab gogs with the log viewer and in the second step I have to be able to edit the openhab config files with vscode. But I can’t even get the log viewer to work.
I urgently need help here!
----------------------------------------
OpenHab
----------------------------------------
version: '2.2'
services:
openhab:
image: "openhab/openhab:4.0.4"
restart: always
network_mode: host
command: "bash -c 'if [ -e /openhab/restore/restore.zip ]; then echo y |/openhab/runtime/bin/restore /openhab/restore/restore.zip ; fi; exec tini -s ./start.sh server'"
ports:
- 2001:2001 #Homematic RF components: 2001
- 2000:2000 #Homematic WIRED components: 2000
- 2010:2010 #Homematic HMIP components: 2010
- 8701:8701 #Homematic CUxD: 8701
- 8181:8181 #Homematic TclRegaScript: 8181
- 9292:9292 #Homematic Groups: 9292
- 9125:9125 #Homematic FROM the gateway to the binding:XML-RPC: 9125
- 9126:9126 #Homematic FROM the gateway to the binding:BIN-RPC: 9126
- 43439:43439 #Homematic CCU Autodiscovery: UDP 43439
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
- "openhab_addons:/openhab/addons"
- "openhab_conf:/openhab/conf"
- "openhab_userdata:/openhab/userdata"
- "openhab_restore:/openhab/restore"
- "openhab_backup:/openhab/backup"
environment:
CRYPTO_POLICY: "unlimited"
EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Berlin"
OPENHAB_HTTP_PORT: "8080"
OPENHAB_HTTPS_PORT: "8443"
volumes:
openhab_addons:
driver: local
openhab_conf:
driver: local
openhab_userdata:
driver: local
openhab_restore:
driver: local
openhab_backup:
driver: local
----------------------------------------
MQTT
----------------------------------------
version: '3.8'
services:
mosquitto:
image: "eclipse-mosquitto:latest"
restart: always
ports:
- 1883:1883
- 8883:8883
- 9001:9001 # some images use this port, check and change the host port accordingly
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
- "mosquitto_config:/mosquitto/config" # you've to create a conf file, see below for sample
- "mosquitto_data:/mosquitto/data"
- "mosquitto_log:/mosquitto/log"
networks:
- mosquitto
networks:
mosquitto:
name: mosquitto
driver: bridge
#####
# Sample mosquitto.conf
#####
# persistence true
# persistence_location /mosquitto/data/
# log_dest file /mosquitto/log/mosquitto.log
# allow_anonymous true
# listener 1883
####
volumes:
mosquitto_config:
driver: local
mosquitto_data:
driver: local
mosquitto_log:
driver: local
----------------------------------------
Portainer
----------------------------------------
---
version: "3"
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
security_opt:
- no-new-privileges:true
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "portainer-data:/data"
ports:
- 9000:9000
volumes:
portainer-data:
driver: local
----------------------------------------
WIKI
----------------------------------------
---
# https://hub.docker.com/r/linuxserver/dokuwiki
version: "2.1"
services:
dokuwiki:
image: lscr.io/linuxserver/dokuwiki:latest
container_name: dokuwiki
environment:
- PUID=1005
- PGID=100
- TZ=Europe/Berlin
volumes:
- "WIKI_config:/config"
ports:
- 8081:80
- 443:443 #optional
restart: unless-stopped
volumes:
WIKI_config:
driver: local
----------------------------------------
LogViewer - here i need only read only acces to the log files
----------------------------------------
version: '2.2'
services:
frontail:
image: "welteki/frontail-openhab:latest"
restart: unless-stopped
command: " --disable-usage-stats --ui-highlight --ui-highlight-preset /frontail/preset/openhab_AEM.json -t openhab_AEM -l 5000 -n 100 /logs/logs/openhab.log /logs/logs/events.log"
volumes:
# Here i tried severel variants
# - "openhab_prod_openhab_userdata/logs:/logs:ro"
# - "openhab_prod_openhab_userdata:/logs:ro"
# - "openhab_userdata:/logs:ro"
- "/var/lib/docker/volumes/openhab_prod_openhab_userdata/_data:/logs:ro"
ports:
- "9201:9001"
volumes:
openhab_prod_openhab_userdata:
external: true
name: openhab_prod_openhab_userdata
----------------------------------------
VS Code - here i need read and write acces to the config files of open hab
----------------------------------------
---
version: "2.1"
services:
code-server:
image: lscr.io/linuxserver/code-server:latest
container_name: code-server
environment:
- PUID=1005
- PGID=100
- TZ=Etc/UTC
# - PASSWORD=password #optional
# - HASHED_PASSWORD= #optional
# - SUDO_PASSWORD=password #optional
# - SUDO_PASSWORD_HASH= #optional
# - PROXY_DOMAIN=code-server.my.domain #optional
# - DEFAULT_WORKSPACE=/config/workspace #optional
volumes:
- "VSCode_Config:/config"
# here i have to add zhe open hab config but firsti tried to fix the log viewer
ports:
- 8444:8443
restart: unless-stopped
volumes:
VSCode_Config:
driver: local
----------------------------------------
My System:
----------------------------------------
================================================================================
= OS/Debian information
================================================================================
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
================================================================================
= openmediavault information
================================================================================
Release: 6.9.12-2
Codename: Shaitan
Client: Docker Engine - Community
Version: 24.0.7
API version: 1.43
Go version: go1.20.10
Git commit: afdd53b
Built: Thu Oct 26 09:08:17 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.7
API version: 1.43 (minimum version 1.12)
Go version: go1.20.10
Git commit: 311b9ff
Built: Thu Oct 26 09:08:17 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.27
GitCommit: a1496014c916f9e62104b33d1bb5bd03b0858e59
runc:
Version: 1.1.11
GitCommit: v1.1.11-0-g4bccb38
docker-init:
Version: 0.19.0
GitCommit: de40ad0