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

Commit

Permalink
Add env variable for webroot
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbenb authored and thelamer committed Mar 31, 2019
1 parent 7f005e5 commit 9653aba
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ docker create \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-e WEBROOT=domoticz `#optional` \
-p 8080:8080 \
-p 6144:6144 \
-p 1443:1443 \
Expand Down Expand Up @@ -101,6 +102,7 @@ services:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- WEBROOT=domoticz #optional
volumes:
- <path to data>:/config
ports:
Expand All @@ -124,6 +126,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
| `-e WEBROOT=domoticz` | Sets webroot to domoticz for usage with subfolder reverse proxy. Not needed unless reverse proxying. |
| `-v /config` | Where Domoticz stores config files and data. |
| `--device <path to device>` | For passing through USB devices. |

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

## Versions

* **30.03.19:** - Add env variable to set webroot.
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
* **11.02.19:** - Add pipeline logic and multi arch.
* **02.07.18:** - Add openssh package.
Expand Down
5 changes: 4 additions & 1 deletion readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ param_devices:
cap_add_param: false

# optional container parameters
opt_param_usage_include_env: false
opt_param_usage_include_env: true
opt_param_env_vars:
- { env_var: "WEBROOT", env_value: "domoticz", desc: "Sets webroot to domoticz for usage with subfolder reverse proxy. Not needed unless reverse proxying." }
opt_param_usage_include_vols: false
opt_param_usage_include_ports: false
opt_param_device_map: false
Expand Down Expand Up @@ -73,6 +75,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "30.03.19:", desc: "Add env variable to set webroot." }
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
- { date: "11.02.19:", desc: "Add pipeline logic and multi arch." }
- { date: "02.07.18:", desc: "Add openssh package." }
Expand Down
6 changes: 5 additions & 1 deletion root/etc/services.d/domoticz/run
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/usr/bin/with-contenv bash

IFS=" " read -r -a RUN_ARRAY <<< "$WEBROOT"

exec \
s6-setuidgid abc /var/lib/domoticz/domoticz \
-sslwww 1443 \
-sslcert /config/keys/server_cert.pem \
-userdata /config/ \
-dbase /config/domoticz.db
-dbase /config/domoticz.db \
-webroot "${RUN_ARRAY[@]}"

0 comments on commit 9653aba

Please sign in to comment.