diff --git a/docs/admin-manual/setup/install.md b/docs/admin-manual/setup/install.md index 222f111fa..93864f31a 100644 --- a/docs/admin-manual/setup/install.md +++ b/docs/admin-manual/setup/install.md @@ -137,6 +137,15 @@ LIBRETIME_PACKAGES_EXCLUDES='liquidsoap' \ https://libretime.example.com ``` +You can persist the install configuration in a `.env` file next to the install script. For example, the above command could be persisted using the `.env` file below, and you should be able to run the install script without arguments: + +``` +LIBRETIME_PACKAGES_EXCLUDES='liquidsoap' +LIBRETIME_LISTEN_PORT='8080' +LIBRETIME_SETUP_POSTGRESQL=false +LIBRETIME_PUBLIC_URL='https://libretime.example.com' +``` + :::note The install script will use randomly generated passwords to create the PostgreSQL user, RabbitMQ user and to update the default Icecast passwords. Those passwords will be saved to the configuration files. diff --git a/install b/install index 8e03ef47e..637bec1b1 100755 --- a/install +++ b/install @@ -93,6 +93,9 @@ EOF done <<< "$(grep -A1 '^# >' "$0")" } +# Load .env file if exists +[[ -f "$SCRIPT_DIR/.env" ]] && source "$SCRIPT_DIR/.env" + # Configuration # > User used to run LibreTime. LIBRETIME_USER=${LIBRETIME_USER:-"www-data"}