Compare commits
12 Commits
8c90128f9a
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 9df8b9cd2e | |||
| a1c4e94cb5 | |||
| 8160861e6b | |||
| edc54b2e85 | |||
| 5278685dff | |||
| 4eb3a9c2c3 | |||
| 3a2d253bcc | |||
| 4d37f159ad | |||
| 2f835e0f74 | |||
| 620dbd7bcc | |||
| b2f703d985 | |||
| 38c3c5b0c7 |
@ -32,7 +32,7 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
setup_uv
|
setup_uv
|
||||||
# Crawling the new version and checking whether an update is required
|
# Crawling the new version and checking whether an update is required
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/Dictionarry-Hub/profilarr/releases/latest | grep "tag_name" | cut -d'"' -f4)
|
RELEASE=$(curl -fsSL https://api.github.com/repos/BiluliB/profilarr/releases/latest | grep "tag_name" | cut -d'"' -f4)
|
||||||
if [[ -z "$RELEASE" ]]; then
|
if [[ -z "$RELEASE" ]]; then
|
||||||
msg_error "Failed to fetch latest release version"
|
msg_error "Failed to fetch latest release version"
|
||||||
exit 1
|
exit 1
|
||||||
@ -57,9 +57,9 @@ function update_script() {
|
|||||||
msg_ok "Backup Created"
|
msg_ok "Backup Created"
|
||||||
|
|
||||||
# Execute Update
|
# Execute Update
|
||||||
msg_info "Updating $APP to v${RELEASE}"
|
msg_info "Updating $APP to ${RELEASE}"
|
||||||
temp_file=$(mktemp)
|
temp_file=$(mktemp)
|
||||||
curl -fsSL -o "$temp_file" "https://github.com/Dictionarry-Hub/profilarr/archive/refs/tags/${RELEASE}.zip"
|
curl -fsSL -o "$temp_file" "https://github.com/BiluliB/profilarr/archive/refs/tags/${RELEASE}.zip"
|
||||||
unzip -q -o "$temp_file" -d /tmp
|
unzip -q -o "$temp_file" -d /tmp
|
||||||
|
|
||||||
# Find the actual extracted directory name
|
# Find the actual extracted directory name
|
||||||
@ -107,6 +107,8 @@ function update_script() {
|
|||||||
cd /opt/${APP}/frontend || exit
|
cd /opt/${APP}/frontend || exit
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
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/
|
cp -r dist/* /opt/${APP}/backend/app/static/
|
||||||
msg_ok "Built Frontend"
|
msg_ok "Built Frontend"
|
||||||
|
|
||||||
|
|||||||
@ -39,13 +39,13 @@ NODE_VERSION="20" install_node_and_modules
|
|||||||
msg_ok "Installed Node.js"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
msg_info "Setup ${APPLICATION}"
|
msg_info "Setup ${APPLICATION}"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/Dictionarry-Hub/profilarr/releases/latest | grep "tag_name" | cut -d'"' -f4)
|
RELEASE=$(curl -fsSL https://api.github.com/repos/BiluliB/profilarr/releases/latest | grep "tag_name" | cut -d'"' -f4)
|
||||||
if [[ -z "$RELEASE" ]]; then
|
if [[ -z "$RELEASE" ]]; then
|
||||||
msg_error "Failed to fetch latest release version"
|
msg_error "Failed to fetch latest release version"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
temp_file=$(mktemp)
|
temp_file=$(mktemp)
|
||||||
$STD curl -fsSL -o "$temp_file" "https://github.com/Dictionarry-Hub/profilarr/archive/refs/tags/${RELEASE}.zip"
|
$STD curl -fsSL -o "$temp_file" "https://github.com/BiluliB/profilarr/archive/refs/tags/${RELEASE}.zip"
|
||||||
$STD unzip -q "$temp_file" -d /tmp
|
$STD unzip -q "$temp_file" -d /tmp
|
||||||
$STD mkdir -p /opt/${APPLICATION}
|
$STD mkdir -p /opt/${APPLICATION}
|
||||||
$STD mkdir -p /opt/${APPLICATION}_config
|
$STD mkdir -p /opt/${APPLICATION}_config
|
||||||
@ -101,7 +101,7 @@ Environment=PATH=/opt/${APPLICATION}/venv/bin:/usr/local/bin:/usr/bin:/bin
|
|||||||
Environment=CONFIG_PATH=/opt/${APPLICATION}_config
|
Environment=CONFIG_PATH=/opt/${APPLICATION}_config
|
||||||
Environment=PYTHONPATH=/opt/${APPLICATION}/backend
|
Environment=PYTHONPATH=/opt/${APPLICATION}/backend
|
||||||
Environment=GIT_PYTHON_REFRESH=quiet
|
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
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
StandardOutput=journal
|
StandardOutput=journal
|
||||||
|
|||||||
Reference in New Issue
Block a user