Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Script: Firefly #616

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Conversation

quantumryuu
Copy link
Contributor

Note

We are meticulous when it comes to merging code into the main branch, so please understand that we may reject pull requests that do not meet the project's standards. It's never personal. Also, game-related scripts have a lower chance of being merged.

Description

Created install script for Firefly

Fixes # (issue)
#385
Project Board

Type of change

Please check the relevant option(s):

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (a fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts.)

Prerequisites

The following efforts must be made for the PR to be considered. Please check when completed:

  • Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions)
  • Testing performed (I have tested my changes, ensuring everything works as expected)
  • Documentation updated (I have updated any relevant documentation)

Additional Information (optional)

Provide any additional context or screenshots about the feature or fix here.

Related Pull Requests / Discussions

If there are other pull requests or discussions related to this change, please link them here:

  • Related PR #

@quantumryuu quantumryuu requested a review from a team as a code owner November 30, 2024 19:01
@github-actions github-actions bot added new script A change that adds a new script website A change to the website labels Nov 30, 2024
@quantumryuu
Copy link
Contributor Author

I have no experience with LAMP stacks etc neither composer.
Tested it + update functionality.
Any feedback welcome!

@quantumryuu quantumryuu changed the title Firefly New Script: Firefly Dec 2, 2024
newzealandpaul
newzealandpaul previously approved these changes Dec 3, 2024
ct/firefly.sh Outdated
rm -rf /opt/firefly
cd /opt
wget -q "https://github.com/firefly-iii/firefly-iii/releases/download/v${RELEASE}/FireflyIII-v${RELEASE}.tar.gz"
mkdir -p /opt/firefly
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? ^^ Clean above rm -rf /opt/firefly/* then is Not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're totally correct! Fixed it 😁

ct/firefly.sh Outdated
chown -R www-data:www-data /opt/firefly
chmod -R 775 /opt/firefly/storage

echo "${RELEASE}" >"/opt/${APP}_version.txt" &>/dev/null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev/null not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

ct/firefly.sh Outdated
mkdir -p /opt/firefly
tar -xzf FireflyIII-v${RELEASE}.tar.gz -C /opt/firefly --exclude='storage'
cd /opt/firefly
composer install --no-dev &>/dev/null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Composer is a sucker. add --no-interaction too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Comment on lines +18 to +31
curl \
mc \
sudo
curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ bookworm main" >/etc/apt/sources.list.d/php.list
$STD apt-get update
$STD apt-get install -y \
apache2 \
php8.3 \
php8.3-cli \
libapache2-mod-php8.3 \
php8.3-{bcmath,intl,curl,zip,gd,xml,mbstring,mysql} \
mariadb-server \
composer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split into Default dependencies (Apache2, madiadb above)

And then create a new MSG Section "Setup PHP" with only the PHP stuff

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but I do not understand how to split this. Do you have any example CTs I can refer to?

ct/firefly.sh Outdated
Comment on lines 1 to 54
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2024 community-scripts ORG
# Author: kristocopani
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE

function header_info {
clear
cat <<"EOF"
_______ ______ ____________
/ ____(_)_______ / __/ /_ __ / _/ _/ _/
/ /_ / / ___/ _ \/ /_/ / / / / / / / / / /
/ __/ / / / / __/ __/ / /_/ / _/ /_/ /_/ /
/_/ /_/_/ \___/_/ /_/\__, / /___/___/___/
/____/

EOF
}
header_info
echo -e "Loading..."
APP="Firefly"
var_disk="2"
var_cpu="1"
var_ram="1024"
var_os="debian"
var_version="12"
variables
color
catch_errors

function default_settings() {
CT_TYPE="1"
PW=""
CT_ID=$NEXTID
HN=$NSAPP
DISK_SIZE="$var_disk"
CORE_COUNT="$var_cpu"
RAM_SIZE="$var_ram"
BRG="vmbr0"
NET="dhcp"
GATE=""
APT_CACHER=""
APT_CACHER_IP=""
DISABLEIP6="no"
MTU=""
SD=""
NS=""
MAC=""
VLAN=""
SSH="no"
VERB="no"
echo_default
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you migrate to new header? Example:

#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2024 tteck
# Author: MickLesk (Canbiz) & vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://hoarder.app/

# App Default Values
APP="Hoarder"
var_tags="bookmark"
var_cpu="2"
var_ram="4096"
var_disk="8"
var_os="debian"
var_version="12"
var_unprivileged="1"

# App Output & Base Settings
header_info "$APP"
base_settings

# Core
variables
color
catch_errors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

ct/firefly.sh Outdated
Comment on lines 110 to 112
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}${CL} \n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you migrate to new footer? Example:

msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@quantumryuu
Copy link
Contributor Author

Hey! I was out of town last week and work is going crazy.
Will fix all three of my PRs in the following days hopefully!

@Belgadon
Copy link

Belgadon commented Dec 17, 2024

Could this also include firefly-iii-fints-importer?

Or the Data Importer?

@turbo1781
Copy link

Can you perhaps add a query that allows you to integrate an external database into an existing LXC?

@MickLesk
Copy link
Member

@quantumryuu What is the status of your PRs? They have been open for 4 weeks now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new script A change that adds a new script website A change to the website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants