Compare commits

14 Commits

Author SHA1 Message Date
9bb805cb99 Merge pull request 'fix service code' (#15) from profilarr-script into dev
Reviewed-on: #15
2025-07-21 15:19:24 +02:00
90e4726a61 Merge pull request 'fix PyYAML version' (#14) from profilarr-script into dev
Reviewed-on: #14
2025-07-21 15:07:51 +02:00
60e56e41bf Merge pull request 'try pip install fix' (#13) from profilarr-script into dev
Reviewed-on: #13
2025-07-21 15:02:17 +02:00
f15ac48b12 Merge pull request 'Added libyaml-dev and python3-dev to the dependencies for building PyYAML' (#12) from profilarr-script into dev
Reviewed-on: #12
2025-07-21 14:51:27 +02:00
aa6bf06cd7 Merge pull request 'fix mv path' (#11) from profilarr-script into dev
Reviewed-on: #11
2025-07-21 14:45:45 +02:00
0c58e5628e Merge pull request 'fixed both script changed pip env to uv' (#10) from profilarr-script into dev
Reviewed-on: #10
2025-07-21 14:30:33 +02:00
9ddda8dcf8 Merge pull request 'fix install url' (#9) from profilarr-script into dev
Reviewed-on: #9
2025-07-21 14:04:36 +02:00
964f99400a Merge pull request 'fixed both sh files' (#8) from profilarr-script into dev
Reviewed-on: #8
2025-07-21 13:59:04 +02:00
e1bbb3121f Merge pull request 'new script: profilarr' (#7) from profilarr-script into dev
Reviewed-on: #7
2025-07-21 13:56:12 +02:00
d9da2ca01d Merge pull request 'fixed install error' (#6) from huly-script into dev
Reviewed-on: #6
2025-06-16 21:53:44 +02:00
1f07de9ebe Merge pull request 'reafctored the whole script' (#5) from huly-script into dev
Reviewed-on: #5
2025-06-14 01:54:42 +02:00
f18b9086f2 Merge pull request 'Changed pip to uv and fix nginx setup' (#4) from huly-script into dev
Reviewed-on: #4
2025-06-14 01:14:21 +02:00
1c3593230c Merge pull request 'Created header for huly' (#3) from huly-script into dev
Reviewed-on: #3
2025-06-14 00:52:50 +02:00
78d16dd0cf Merge pull request 'New Script: huly' (#2) from huly-script into dev
Reviewed-on: #2
2025-06-14 00:43:02 +02:00
2 changed files with 18 additions and 16 deletions

View File

@@ -32,7 +32,7 @@ function update_script() {
fi
setup_uv
# Crawling the new version and checking whether an update is required
RELEASE=$(curl -fsSL https://api.github.com/repos/BiluliB/profilarr/releases/latest | grep "tag_name" | cut -d'"' -f4)
RELEASE=$(curl -fsSL https://api.github.com/repos/Dictionarry-Hub/profilarr/releases/latest | grep "tag_name" | cut -d'"' -f4)
if [[ -z "$RELEASE" ]]; then
msg_error "Failed to fetch latest release version"
exit 1
@@ -57,9 +57,9 @@ function update_script() {
msg_ok "Backup Created"
# Execute Update
msg_info "Updating $APP to ${RELEASE}"
msg_info "Updating $APP to v${RELEASE}"
temp_file=$(mktemp)
curl -fsSL -o "$temp_file" "https://github.com/BiluliB/profilarr/archive/refs/tags/${RELEASE}.zip"
curl -fsSL -o "$temp_file" "https://github.com/Dictionarry-Hub/profilarr/archive/refs/tags/${RELEASE}.zip"
unzip -q -o "$temp_file" -d /tmp
# Find the actual extracted directory name
@@ -107,8 +107,6 @@ function update_script() {
cd /opt/${APP}/frontend || exit
npm install
npm run build
# Ensure the static directory exists before copying
mkdir -p /opt/${APP}/backend/app/static/
cp -r dist/* /opt/${APP}/backend/app/static/
msg_ok "Built Frontend"

View File

@@ -20,8 +20,7 @@ $STD apt-get install -y \
unzip \
build-essential \
libyaml-dev \
python3-dev \
git
python3-dev
msg_ok "Installed Dependencies"
msg_info "Installing Python"
@@ -39,13 +38,13 @@ NODE_VERSION="20" install_node_and_modules
msg_ok "Installed Node.js"
msg_info "Setup ${APPLICATION}"
RELEASE=$(curl -fsSL https://api.github.com/repos/BiluliB/profilarr/releases/latest | grep "tag_name" | cut -d'"' -f4)
RELEASE=$(curl -fsSL https://api.github.com/repos/Dictionarry-Hub/profilarr/releases/latest | grep "tag_name" | cut -d'"' -f4)
if [[ -z "$RELEASE" ]]; then
msg_error "Failed to fetch latest release version"
exit 1
fi
temp_file=$(mktemp)
$STD curl -fsSL -o "$temp_file" "https://github.com/BiluliB/profilarr/archive/refs/tags/${RELEASE}.zip"
$STD curl -fsSL -o "$temp_file" "https://github.com/Dictionarry-Hub/profilarr/archive/refs/tags/${RELEASE}.zip"
$STD unzip -q "$temp_file" -d /tmp
$STD mkdir -p /opt/${APPLICATION}
$STD mkdir -p /opt/${APPLICATION}_config
@@ -100,8 +99,7 @@ WorkingDirectory=/opt/${APPLICATION}/backend
Environment=PATH=/opt/${APPLICATION}/venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=CONFIG_PATH=/opt/${APPLICATION}_config
Environment=PYTHONPATH=/opt/${APPLICATION}/backend
Environment=GIT_PYTHON_REFRESH=quiet
ExecStart=/opt/${APPLICATION}/venv/bin/python -m gunicorn --bind 0.0.0.0:6868 --workers 2 --timeout 120 --pythonpath /opt/${APPLICATION}/backend "app.main:create_app()"
ExecStart=/opt/${APPLICATION}/venv/bin/python -m gunicorn --bind 0.0.0.0:6868 --workers 2 --timeout 120 --pythonpath /opt/${APPLICATION}/backend app.main:create_app
Restart=always
RestartSec=10
StandardOutput=journal
@@ -120,14 +118,23 @@ cd /opt/${APPLICATION}/backend
# Check if the main module exists and is importable
if ! /opt/${APPLICATION}/venv/bin/python -c "
import sys
import os
sys.path.insert(0, '/opt/${APPLICATION}/backend')
os.environ['GIT_PYTHON_REFRESH'] = 'quiet'
try:
import app.main
print('✓ app.main imported successfully')
except ImportError as e:
print(f'✗ Import error: {e}')
# List directory structure for debugging
import os
print('Backend directory contents:')
for root, dirs, files in os.walk('/opt/${APPLICATION}/backend'):
level = root.replace('/opt/${APPLICATION}/backend', '').count(os.sep)
indent = ' ' * 2 * level
print(f'{indent}{os.path.basename(root)}/')
subindent = ' ' * 2 * (level + 1)
for file in files:
if file.endswith('.py'):
print(f'{subindent}{file}')
sys.exit(1)
except Exception as e:
print(f'✗ Other error: {e}')
@@ -151,7 +158,6 @@ User=root
WorkingDirectory=/opt/${APPLICATION}/backend
Environment=PATH=/opt/${APPLICATION}/venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=CONFIG_PATH=/opt/${APPLICATION}_config
Environment=GIT_PYTHON_REFRESH=quiet
ExecStart=/opt/${APPLICATION}/venv/bin/python run.py
Restart=always
RestartSec=10
@@ -173,7 +179,6 @@ User=root
WorkingDirectory=/opt/${APPLICATION}/backend
Environment=PATH=/opt/${APPLICATION}/venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=CONFIG_PATH=/opt/${APPLICATION}_config
Environment=GIT_PYTHON_REFRESH=quiet
ExecStart=/opt/${APPLICATION}/venv/bin/python main.py
Restart=always
RestartSec=10
@@ -196,7 +201,6 @@ User=root
WorkingDirectory=/opt/${APPLICATION}/backend
Environment=PATH=/opt/${APPLICATION}/venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=CONFIG_PATH=/opt/${APPLICATION}_config
Environment=GIT_PYTHON_REFRESH=quiet
Environment=FLASK_APP=app.main:create_app
Environment=FLASK_RUN_HOST=0.0.0.0
Environment=FLASK_RUN_PORT=6868