Skip to content

Commit

Permalink
Set default webui password
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad committed Aug 29, 2024
1 parent bf4041a commit 788a53e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pipeline {
CI_DELAY='120'
CI_DOCKERENV='SETTINGS_ENCRYPTION_KEY=abcde12345'
CI_AUTH=''
CI_WEBPATH=''
CI_WEBPATH='/login.html'
}
stages {
stage("Set git config"){
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ services:
- TZ=Etc/UTC
- SETTINGS_ENCRYPTION_KEY=
- CLI_ARGS= #optional
- DUPLICATI__WEBSERVICE_PASSWORD= #optional
volumes:
- /path/to/duplicati/config:/config
- /path/to/backups:/backups
Expand All @@ -109,6 +110,7 @@ docker run -d \
-e TZ=Etc/UTC \
-e SETTINGS_ENCRYPTION_KEY= \
-e CLI_ARGS= `#optional` \
-e DUPLICATI__WEBSERVICE_PASSWORD= `#optional` \
-p 8200:8200 \
-v /path/to/duplicati/config:/config \
-v /path/to/backups:/backups \
Expand All @@ -129,6 +131,7 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e SETTINGS_ENCRYPTION_KEY=` | Encryption key for settings database. Minimum 8 characters, alphanumeric. |
| `-e CLI_ARGS=` | Optionally specify any [CLI variables](https://duplicati.readthedocs.io/en/latest/07-other-command-line-utilities/) you want to launch the app with |
| `-e DUPLICATI__WEBSERVICE_PASSWORD=` | Password for the webui. If left unset will default to `changeme` and can be changed from the webui settings. |
| `-v /config` | Contains all relevant configuration files. |
| `-v /backups` | Path to store local backups. |
| `-v /source` | Path to source for files to backup. |
Expand Down
2 changes: 1 addition & 1 deletion jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ repo_vars:
- CI_DELAY='120'
- CI_DOCKERENV='SETTINGS_ENCRYPTION_KEY=abcde12345'
- CI_AUTH=''
- CI_WEBPATH=''
- CI_WEBPATH='/login.html'
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ param_env_vars:
opt_param_usage_include_env: true
opt_param_env_vars:
- { env_var: "CLI_ARGS", env_value: "", desc: "Optionally specify any [CLI variables](https://duplicati.readthedocs.io/en/latest/07-other-command-line-utilities/) you want to launch the app with" }
- { env_var: "DUPLICATI__WEBSERVICE_PASSWORD", env_value: "", desc: "Password for the webui. If left unset will default to `changeme` and can be changed from the webui settings."}

# application setup block
app_setup_block_enabled: true
Expand Down
3 changes: 3 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-duplicati-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ if [[ -f "/config/Duplicati-server.sqlite" ]]; then
fi
else
# New install
if [[ -z ${DUPLICATI__WEBSERVICE_PASSWORD} ]]; then
printf "changeme" > /run/s6/container_environment/DUPLICATI__WEBSERVICE_PASSWORD
fi
if [[ -n ${SETTINGS_ENCRYPTION_KEY} ]]; then
# Enable settings encryption
true
Expand Down

0 comments on commit 788a53e

Please sign in to comment.