Skip to content
This repository was archived by the owner on Jan 1, 2024. It is now read-only.

Commit a869f57

Browse files
committed
Add env. variable for setting custom databas path
1 parent 768b9df commit a869f57

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ services:
9393
- PGID=1000
9494
- TZ=Europe/London
9595
- WEBROOT=domoticz #optional
96+
- DBASE=<path to database> #optional
9697
volumes:
9798
- <path to data>:/config
9899
ports:
@@ -113,6 +114,7 @@ docker run -d \
113114
-e PGID=1000 \
114115
-e TZ=Europe/London \
115116
-e WEBROOT=domoticz `#optional` \
117+
-e DBASE=<path to database> `#optional` \
116118
-p 8080:8080 \
117119
-p 6144:6144 \
118120
-p 1443:1443 \
@@ -147,6 +149,7 @@ Container images are configured using parameters passed at runtime (such as thos
147149
| `-e PGID=1000` | for GroupID - see below for explanation |
148150
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
149151
| `-e WEBROOT=domoticz` | Sets webroot to domoticz for usage with subfolder reverse proxy. Not needed unless reverse proxying. |
152+
| `-e DBASE=<path to database>` | Sets path to database. Do not set unless you know what this does. |
150153
| `-v /config` | Where Domoticz stores config files and data. |
151154
| `--device path to device` | For passing through USB devices. |
152155

@@ -259,7 +262,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
259262

260263
## Versions
261264

262-
* **05.02.22:** - Set default webroot to /.
265+
* **05.02.22:** - Set default webroot to /. Add env. variable for setting custom databas path.
263266
* **26.12.20:** - Rebase to Ubuntu Focal, see [here](https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal) for troubleshooting armhf.
264267
* **24.11.19:** - Change to using domoticz builtin Lua and MQTT.
265268
* **03.11.19:** - Set capabilities for domoticz binary and move cmake from edge repo.

readme-vars.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ cap_add_param: false
4747
opt_param_usage_include_env: true
4848
opt_param_env_vars:
4949
- { env_var: "WEBROOT", env_value: "domoticz", desc: "Sets webroot to domoticz for usage with subfolder reverse proxy. Not needed unless reverse proxying." }
50+
- { env_var: "DBASE", env_value: "<path to database>", desc: "Sets path to database. Do not set unless you know what this does." }
5051
opt_param_usage_include_vols: false
5152
opt_param_usage_include_ports: false
5253
opt_param_device_map: false
@@ -74,7 +75,7 @@ app_setup_block: |
7475
7576
# changelog
7677
changelogs:
77-
- { date: "05.02.22:", desc: "Set default webroot to /." }
78+
- { date: "05.02.22:", desc: "Set default webroot to /. Add env. variable for setting custom databas path." }
7879
- { date: "26.12.20:", desc: "Rebase to Ubuntu Focal, see [here](https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal) for troubleshooting armhf." }
7980
- { date: "24.11.19:", desc: "Change to using domoticz builtin Lua and MQTT." }
8081
- { date: "03.11.19:", desc: "Set capabilities for domoticz binary and move cmake from edge repo." }

root/etc/services.d/domoticz/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ setcap cap_net_raw=+eip /usr/bin/domoticz
88
exec \
99
s6-setuidgid abc /usr/bin/domoticz \
1010
-approot /usr/share/domoticz/ \
11-
-dbase /config/domoticz.db \
11+
-dbase "${DBASE:-/config/domoticz.db}" \
1212
-noupdate \
1313
-sslwww 1443 \
1414
-sslcert /config/keys/server_cert.pem \

0 commit comments

Comments
 (0)