mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-27 16:27:36 +00:00
Reactive Resume: switch source to community-maintained fork (#6051)
Remove entire folder before update
This commit is contained in:
@ -3,7 +3,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: vhsdream
|
# Author: vhsdream
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://rxresu.me
|
# Source: https://rxresume.org
|
||||||
|
|
||||||
APP="Reactive-Resume"
|
APP="Reactive-Resume"
|
||||||
var_tags="${var_tags:-documents}"
|
var_tags="${var_tags:-documents}"
|
||||||
@ -25,23 +25,20 @@ function update_script() {
|
|||||||
check_container_resources
|
check_container_resources
|
||||||
|
|
||||||
if [[ ! -f /etc/systemd/system/Reactive-Resume.service ]]; then
|
if [[ ! -f /etc/systemd/system/Reactive-Resume.service ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No $APP Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/lazy-media/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
if [[ ! -f "$HOME"/.reactive-resume ]] || [[ "$RELEASE" != "$(cat "$HOME"/.reactive-resume)" ]]; then
|
||||||
msg_info "Stopping services"
|
msg_info "Stopping services"
|
||||||
systemctl stop Reactive-Resume
|
systemctl stop Reactive-Resume
|
||||||
msg_ok "Stopped services"
|
msg_ok "Stopped services"
|
||||||
|
|
||||||
|
cp /opt/"$APP"/.env /opt/rxresume.env
|
||||||
|
rm -rf /opt/"$APP"
|
||||||
|
fetch_and_deploy_gh_release "Reactive-Resume" "lazy-media/Reactive-Resume"
|
||||||
msg_info "Updating $APP to v${RELEASE}"
|
msg_info "Updating $APP to v${RELEASE}"
|
||||||
cp /opt/${APP}/.env /opt/rxresume.env
|
cd /opt/"$APP"
|
||||||
res_tmp=$(mktemp)
|
|
||||||
rm -rf /opt/${APP}
|
|
||||||
curl -fsSL "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -O $res_tmp
|
|
||||||
$STD unzip $res_tmp
|
|
||||||
mv ${APP}-${RELEASE}/ /opt/${APP}
|
|
||||||
cd /opt/${APP}
|
|
||||||
export PUPPETEER_SKIP_DOWNLOAD="true"
|
export PUPPETEER_SKIP_DOWNLOAD="true"
|
||||||
export NEXT_TELEMETRY_DISABLED=1
|
export NEXT_TELEMETRY_DISABLED=1
|
||||||
export CI="true"
|
export CI="true"
|
||||||
@ -49,7 +46,7 @@ function update_script() {
|
|||||||
$STD pnpm install --frozen-lockfile
|
$STD pnpm install --frozen-lockfile
|
||||||
$STD pnpm run build
|
$STD pnpm run build
|
||||||
$STD pnpm run prisma:generate
|
$STD pnpm run prisma:generate
|
||||||
mv /opt/rxresume.env /opt/${APP}/.env
|
mv /opt/rxresume.env /opt/"$APP"/.env
|
||||||
msg_ok "Updated $APP to v${RELEASE}"
|
msg_ok "Updated $APP to v${RELEASE}"
|
||||||
|
|
||||||
msg_info "Updating Minio"
|
msg_info "Updating Minio"
|
||||||
@ -62,12 +59,12 @@ function update_script() {
|
|||||||
msg_info "Updating Browserless (Patience)"
|
msg_info "Updating Browserless (Patience)"
|
||||||
systemctl stop browserless
|
systemctl stop browserless
|
||||||
cp /opt/browserless/.env /opt/browserless.env
|
cp /opt/browserless/.env /opt/browserless.env
|
||||||
rm -rf browserless
|
rm -rf /opt/browserless
|
||||||
brwsr_tmp=$(mktemp)
|
brwsr_tmp=$(mktemp)
|
||||||
TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
|
TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -O $brwsr_tmp
|
curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v"$TAG".zip -o "$brwsr_tmp"
|
||||||
$STD unzip $brwsr_tmp
|
$STD unzip "$brwsr_tmp"
|
||||||
mv browserless-${TAG}/ /opt/browserless
|
mv browserless-"$TAG"/ /opt/browserless
|
||||||
cd /opt/browserless
|
cd /opt/browserless
|
||||||
$STD npm install
|
$STD npm install
|
||||||
rm -rf src/routes/{chrome,edge,firefox,webkit}
|
rm -rf src/routes/{chrome,edge,firefox,webkit}
|
||||||
@ -84,14 +81,12 @@ function update_script() {
|
|||||||
|
|
||||||
msg_info "Cleaning Up"
|
msg_info "Cleaning Up"
|
||||||
rm -f /tmp/minio.deb
|
rm -f /tmp/minio.deb
|
||||||
rm -f $brwsr_tmp
|
rm -f "$brwsr_tmp"
|
||||||
rm -f $res_tmp
|
|
||||||
msg_ok "Cleanup Completed"
|
msg_ok "Cleanup Completed"
|
||||||
|
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
|
||||||
msg_ok "Update Successful"
|
msg_ok "Update Successful"
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
msg_ok "No update required. $APP is already at v{$RELEASE}"
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
"updateable": true,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 3000,
|
"interface_port": 3000,
|
||||||
"documentation": "https://docs.rxresu.me/",
|
"documentation": "https://docs.rxresume.org/",
|
||||||
"website": "https://rxresu.me",
|
"website": "https://rxresume.org",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/reactive-resume-light.png",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/reactive-resume-light.png",
|
||||||
"config_path": "/opt/reactive-resume/.env",
|
"config_path": "/opt/reactive-resume/.env",
|
||||||
"description": "A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever.",
|
"description": "A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever.",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: vhsdream
|
# Author: vhsdream
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://rxresu.me
|
# Source: https://rxresume.org
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@ -32,19 +32,16 @@ $STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_
|
|||||||
$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
|
$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
|
||||||
msg_ok "Set up Database"
|
msg_ok "Set up Database"
|
||||||
|
|
||||||
msg_info "Installing ${APPLICATION}"
|
msg_info "Installing $APPLICATION"
|
||||||
MINIO_PASS=$(openssl rand -base64 48)
|
MINIO_PASS=$(openssl rand -base64 48)
|
||||||
ACCESS_TOKEN=$(openssl rand -base64 48)
|
ACCESS_TOKEN=$(openssl rand -base64 48)
|
||||||
REFRESH_TOKEN=$(openssl rand -base64 48)
|
REFRESH_TOKEN=$(openssl rand -base64 48)
|
||||||
CHROME_TOKEN=$(openssl rand -hex 32)
|
CHROME_TOKEN=$(openssl rand -hex 32)
|
||||||
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||||
TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
|
TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
curl -fsSL "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -o v${RELEASE}.zip
|
fetch_and_deploy_gh_release "Reactive-Resume" "lazy-media/Reactive-Resume"
|
||||||
$STD unzip v${RELEASE}.zip
|
cd /opt/"$APPLICATION"
|
||||||
mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION}
|
|
||||||
cd /opt/${APPLICATION}
|
|
||||||
corepack enable
|
|
||||||
export CI="true"
|
export CI="true"
|
||||||
export PUPPETEER_SKIP_DOWNLOAD="true"
|
export PUPPETEER_SKIP_DOWNLOAD="true"
|
||||||
export NODE_ENV="production"
|
export NODE_ENV="production"
|
||||||
@ -53,13 +50,13 @@ $STD pnpm install --frozen-lockfile
|
|||||||
$STD pnpm run build
|
$STD pnpm run build
|
||||||
$STD pnpm install --prod --frozen-lockfile
|
$STD pnpm install --prod --frozen-lockfile
|
||||||
$STD pnpm run prisma:generate
|
$STD pnpm run prisma:generate
|
||||||
msg_ok "Installed ${APPLICATION}"
|
msg_ok "Installed $APPLICATION"
|
||||||
|
|
||||||
msg_info "Installing Browserless (Patience)"
|
msg_info "Installing Browserless (Patience)"
|
||||||
cd /tmp
|
cd /tmp
|
||||||
curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -o v${TAG}.zip
|
curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v"$TAG".zip -o v"$TAG".zip
|
||||||
$STD unzip v${TAG}.zip
|
$STD unzip v"$TAG".zip
|
||||||
mv browserless-${TAG} /opt/browserless
|
mv browserless-"$TAG" /opt/browserless
|
||||||
cd /opt/browserless
|
cd /opt/browserless
|
||||||
$STD npm install
|
$STD npm install
|
||||||
rm -rf src/routes/{chrome,edge,firefox,webkit}
|
rm -rf src/routes/{chrome,edge,firefox,webkit}
|
||||||
@ -77,9 +74,10 @@ MINIO_ROOT_PASSWORD="${MINIO_PASS}"
|
|||||||
MINIO_VOLUMES=/opt/minio
|
MINIO_VOLUMES=/opt/minio
|
||||||
MINIO_OPTS="--address :9000 --console-address 127.0.0.1:9001"
|
MINIO_OPTS="--address :9000 --console-address 127.0.0.1:9001"
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF >/opt/${APPLICATION}/.env
|
cat <<EOF >/opt/"$APPLICATION"/.env
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
PORT=3000
|
PORT=3000
|
||||||
|
# for use behind a reverse proxy, use your FQDN for PUBLIC_URL and STORAGE_URL
|
||||||
PUBLIC_URL=http://${LOCAL_IP}:3000
|
PUBLIC_URL=http://${LOCAL_IP}:3000
|
||||||
STORAGE_URL=http://${LOCAL_IP}:9000/rxresume
|
STORAGE_URL=http://${LOCAL_IP}:9000/rxresume
|
||||||
DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}?schema=public
|
DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}?schema=public
|
||||||
@ -116,14 +114,13 @@ HOST=localhost
|
|||||||
PORT=8080
|
PORT=8080
|
||||||
TOKEN=${CHROME_TOKEN}
|
TOKEN=${CHROME_TOKEN}
|
||||||
EOF
|
EOF
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
|
||||||
{
|
{
|
||||||
echo "${APPLICATION} Credentials"
|
echo "${APPLICATION} Credentials"
|
||||||
echo "Database User: $DB_USER"
|
echo "Database User: $DB_USER"
|
||||||
echo "Database Password: $DB_PASS"
|
echo "Database Password: $DB_PASS"
|
||||||
echo "Database Name: $DB_NAME"
|
echo "Database Name: $DB_NAME"
|
||||||
echo "Minio Root Password: ${MINIO_PASS}"
|
echo "Minio Root Password: ${MINIO_PASS}"
|
||||||
} >>~/${APPLICATION}.creds
|
} >>~/"$APPLICATION".creds
|
||||||
msg_ok "Configured applications"
|
msg_ok "Configured applications"
|
||||||
|
|
||||||
msg_info "Creating Services"
|
msg_info "Creating Services"
|
||||||
@ -136,7 +133,7 @@ WorkingDirectory=/usr/local/bin
|
|||||||
EnvironmentFile=/opt/minio/.env
|
EnvironmentFile=/opt/minio/.env
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
|
cat <<EOF >/etc/systemd/system/"$APPLICATION".service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=${APPLICATION} Service
|
Description=${APPLICATION} Service
|
||||||
After=network.target postgresql.service minio.service
|
After=network.target postgresql.service minio.service
|
||||||
@ -167,15 +164,14 @@ Restart=unless-stopped
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable -q --now minio.service ${APPLICATION}.service browserless.service
|
systemctl enable -q --now minio.service "$APPLICATION".service browserless.service
|
||||||
msg_ok "Created Services"
|
msg_ok "Created Services"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -f /tmp/v${RELEASE}.zip
|
rm -f /tmp/v"$TAG".zip
|
||||||
rm -f /tmp/v${TAG}.zip
|
|
||||||
rm -f /tmp/minio.deb
|
rm -f /tmp/minio.deb
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
|
Reference in New Issue
Block a user