-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Complete rewrite using [nushell](https://nushell.sh)** ## Major updates and breaking changes * To enter nushell do `docker exec -it container_name nu` and type `bf-freshrss+ tab` to see a complete list of functions * All environment variables now begin `BF_FR` ## Minor updates * Updating to PHP 8.3.2 * Updating to FreshRSS 1.23.1 ## Documentation updates * Updating copyright year to 2024
- Loading branch information
Showing
29 changed files
with
234 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.0.21 | ||
4.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3 | ||
4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.0 | ||
4.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use bf | ||
bf env load | ||
|
||
# Override Nginx public environment variable to point to FreshRSS source | ||
def main [] { | ||
let fr_src = $"(bf env ETC_SRC)/freshrss" | ||
bf env set FR_SRC $fr_src | ||
bf env set NGINX_PUBLIC $"($fr_src)/p" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use bf | ||
bf env load | ||
|
||
# Set environment variables | ||
def main [] { | ||
let fr_data = "/data" | ||
bf env set FR_DATA $fr_data | ||
bf env set FR_CONFIG $"($fr_data)/config.php" | ||
|
||
let fr_src = bf env FR_SRC | ||
bf env set FR_SRC_CLI $"($fr_src)/cli" | ||
bf env set FR_SRC_DATA $"($fr_src)/data" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use bf | ||
use bf-freshrss | ||
bf env load | ||
|
||
def main [] { | ||
# get variables | ||
let fr_data = bf env FR_DATA | ||
let fr_src_data = bf env FR_SRC_DATA | ||
|
||
# ensure /data is symlinked from source | ||
if ($fr_src_data | bf fs is_not_symlink) { | ||
bf write $"Deleting ($fr_src_data) and recreating it as a symlink." | ||
rm --force --recursive $fr_src_data | ||
^ln -s $fr_data $fr_src_data | ||
} | ||
|
||
# if there is a valid config file, mark the installation as complete | ||
if (bf env FR_CONFIG | path exists) { bf-freshrss install complete } | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
use bf | ||
use bf-freshrss | ||
bf env load | ||
|
||
def main [] { | ||
# get source data directory | ||
let fr_src_data = bf env FR_SRC_DATA | ||
|
||
# if data source is not a symlink, the content setup has not worked correctly | ||
if ($fr_src_data | bf fs is_not_symlink) { bf write error $"($fr_src_data) is not set up correctly." } | ||
|
||
# if an existing installation was detected, do not proceed | ||
if (bf env check FR_INSTALLED) { | ||
bf write "Existing installation detected - do not reinstall." | ||
bf-freshrss install complete | ||
return | ||
} | ||
|
||
# get variables | ||
let fr_user = bf env FR_USER | ||
let fr_pass = bf env FR_PASS | ||
let fr_environment = bf env FR_ENVIRONMENT | ||
let fr_language = bf env FR_LANGUAGE | ||
let fr_base_url = bf env FR_BASE_URL | ||
let fr_db_type = bf env FR_DB_TYPE | ||
let fr_db_host = bf env FR_DB_HOST | ||
let fr_db_user = bf env FR_DB_USER | ||
let fr_db_pass = bf env FR_DB_PASS | ||
let fr_db_name = bf env FR_DB_NAME | ||
let fr_db_prefix = bf env FR_DB_PREFIX | ||
|
||
# use CLI to run automated installation | ||
bf write "Using CLI to install FreshRSS." | ||
cd (bf env FR_SRC) | ||
|
||
# ensure all the needed directories are in the data dir | ||
bf write " .. preparing data directories" | ||
^php ./cli/prepare.php | ||
|
||
# install default database | ||
bf write " .. installing database" | ||
let args = [ | ||
"--default_user" $fr_user | ||
"--environment" $fr_environment | ||
"--base_url" $fr_base_url | ||
"--language" $fr_language | ||
"--db-type" $fr_db_type | ||
"--db-host" $fr_db_host | ||
"--db-user" $fr_db_user | ||
"--db-password" $fr_db_pass | ||
"--db-base" $fr_db_name | ||
"--db-prefix" $fr_db_prefix | ||
"--disable_update" "true" | ||
] | ||
^php ./cli/do-install.php ...$args | ||
|
||
# create user | ||
bf write " .. creating user account" | ||
^php ./cli/create-user.php --user $fr_user --password $fr_pass | ||
^php ./cli/actualize-user.php --user $fr_user | ||
|
||
# reset permissions | ||
cd .. | ||
^sh cli/access-permissions.sh | ||
bf ch --owner www:www --recurse (bf env FR_DATA) | ||
|
||
# setup complete | ||
bf-freshrss install complete | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use bf | ||
use bf-freshrss | ||
bf env load | ||
|
||
def main [] { | ||
# check whether or not the application is installed | ||
if (bf-freshrss install check) { | ||
bf clean | ||
bf write ok "FreshRSS is installed." | ||
return | ||
} | ||
|
||
# installation has not been detected or successful | ||
bf write error "FreshRSS setup did not complete successfully, terminating container." | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use bf | ||
|
||
const installed = "FR_INSTALLED" | ||
|
||
# Mark the application as installed. | ||
export def complete [] { bf env set $installed 1} | ||
|
||
# Check whether or not the application is installed. | ||
export def check [] { bf env check $installed } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export module install.nu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.22 | ||
1.23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.22.1 | ||
1.23.1 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.