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

Commit 9653aba

Browse files
tobbenbthelamer
authored andcommitted
Add env variable for webroot
1 parent 7f005e5 commit 9653aba

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ docker create \
6464
-e PUID=1000 \
6565
-e PGID=1000 \
6666
-e TZ=Europe/London \
67+
-e WEBROOT=domoticz `#optional` \
6768
-p 8080:8080 \
6869
-p 6144:6144 \
6970
-p 1443:1443 \
@@ -101,6 +102,7 @@ services:
101102
- PUID=1000
102103
- PGID=1000
103104
- TZ=Europe/London
105+
- WEBROOT=domoticz #optional
104106
volumes:
105107
- <path to data>:/config
106108
ports:
@@ -124,6 +126,7 @@ Container images are configured using parameters passed at runtime (such as thos
124126
| `-e PUID=1000` | for UserID - see below for explanation |
125127
| `-e PGID=1000` | for GroupID - see below for explanation |
126128
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
129+
| `-e WEBROOT=domoticz` | Sets webroot to domoticz for usage with subfolder reverse proxy. Not needed unless reverse proxying. |
127130
| `-v /config` | Where Domoticz stores config files and data. |
128131
| `--device <path to device>` | For passing through USB devices. |
129132

@@ -190,6 +193,7 @@ Below are the instructions for updating containers:
190193

191194
## Versions
192195

196+
* **30.03.19:** - Add env variable to set webroot.
193197
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
194198
* **11.02.19:** - Add pipeline logic and multi arch.
195199
* **02.07.18:** - Add openssh package.

readme-vars.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ param_devices:
4545
cap_add_param: false
4646

4747
# optional container parameters
48-
opt_param_usage_include_env: false
48+
opt_param_usage_include_env: true
49+
opt_param_env_vars:
50+
- { env_var: "WEBROOT", env_value: "domoticz", desc: "Sets webroot to domoticz for usage with subfolder reverse proxy. Not needed unless reverse proxying." }
4951
opt_param_usage_include_vols: false
5052
opt_param_usage_include_ports: false
5153
opt_param_device_map: false
@@ -73,6 +75,7 @@ app_setup_block: |
7375
7476
# changelog
7577
changelogs:
78+
- { date: "30.03.19:", desc: "Add env variable to set webroot." }
7679
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
7780
- { date: "11.02.19:", desc: "Add pipeline logic and multi arch." }
7881
- { date: "02.07.18:", desc: "Add openssh package." }

root/etc/services.d/domoticz/run

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#!/usr/bin/with-contenv bash
2+
3+
IFS=" " read -r -a RUN_ARRAY <<< "$WEBROOT"
4+
25
exec \
36
s6-setuidgid abc /var/lib/domoticz/domoticz \
47
-sslwww 1443 \
58
-sslcert /config/keys/server_cert.pem \
69
-userdata /config/ \
7-
-dbase /config/domoticz.db
10+
-dbase /config/domoticz.db \
11+
-webroot "${RUN_ARRAY[@]}"

0 commit comments

Comments
 (0)