Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit 921f64b

Browse files
pull upstream changes (#62)
Co-authored-by: bketelsen <37492+bketelsen@users.noreply.github.com>
1 parent 7524dae commit 921f64b

7 files changed

Lines changed: 1183 additions & 9 deletions

File tree

ct/headers/reactive-resume

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
____ __ _ ____
2+
/ __ \___ ____ ______/ /_(_) _____ / __ \___ _______ ______ ___ ___
3+
/ /_/ / _ \/ __ `/ ___/ __/ / | / / _ \______/ /_/ / _ \/ ___/ / / / __ `__ \/ _ \
4+
/ _, _/ __/ /_/ / /__/ /_/ /| |/ / __/_____/ _, _/ __(__ ) /_/ / / / / / / __/
5+
/_/ |_|\___/\__,_/\___/\__/_/ |___/\___/ /_/ |_|\___/____/\__,_/_/ /_/ /_/\___/
6+

ct/reactive-resume.sh

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: vhsdream
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://rxresu.me
7+
8+
APP="Reactive-Resume"
9+
var_tags="${var_tags:-documents}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-3072}"
12+
var_disk="${var_disk:-8}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -f /etc/systemd/system/Reactive-Resume.service ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
RELEASE=$(curl -fsSL https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
32+
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
33+
msg_info "Stopping services"
34+
systemctl stop Reactive-Resume
35+
msg_ok "Stopped services"
36+
37+
msg_info "Updating $APP to v${RELEASE}"
38+
cp /opt/${APP}/.env /opt/rxresume.env
39+
res_tmp=$(mktemp)
40+
rm -rf /opt/${APP}
41+
curl -fsSL "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -O $res_tmp
42+
unzip -q $res_tmp
43+
mv ${APP}-${RELEASE}/ /opt/${APP}
44+
cd /opt/${APP}
45+
export PUPPETEER_SKIP_DOWNLOAD="true"
46+
export NEXT_TELEMETRY_DISABLED=1
47+
export CI="true"
48+
export NODE_ENV="production"
49+
$STD pnpm install --frozen-lockfile
50+
$STD pnpm run build
51+
$STD pnpm run prisma:generate
52+
mv /opt/rxresume.env /opt/${APP}/.env
53+
msg_ok "Updated $APP to v${RELEASE}"
54+
55+
msg_info "Updating Minio"
56+
systemctl stop minio
57+
cd /tmp
58+
curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio.deb -o minio.deb
59+
$STD dpkg -i minio.deb
60+
msg_ok "Updated Minio"
61+
62+
msg_info "Updating Browserless (Patience)"
63+
systemctl stop browserless
64+
cp /opt/browserless/.env /opt/browserless.env
65+
rm -rf browserless
66+
brwsr_tmp=$(mktemp)
67+
TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
68+
curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -O $brwsr_tmp
69+
unzip -q $brwsr_tmp
70+
mv browserless-${TAG}/ /opt/browserless
71+
cd /opt/browserless
72+
$STD npm install
73+
rm -rf src/routes/{chrome,edge,firefox,webkit}
74+
$STD node_modules/playwright-core/cli.js install --with-deps chromium
75+
$STD npm run build
76+
$STD npm run build:function
77+
$STD npm prune production
78+
mv /opt/browserless.env /opt/browserless/.env
79+
msg_ok "Updated Browserless"
80+
81+
msg_info "Restarting services"
82+
systemctl start minio Reactive-Resume browserless
83+
msg_ok "Restarted services"
84+
85+
msg_info "Cleaning Up"
86+
rm -f /tmp/minio.deb
87+
rm -f $brwsr_tmp
88+
rm -f $res_tmp
89+
msg_ok "Cleanup Completed"
90+
91+
echo "${RELEASE}" >/opt/${APP}_version.txt
92+
msg_ok "Update Successful"
93+
else
94+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
95+
fi
96+
exit
97+
}
98+
99+
start
100+
build_container
101+
description
102+
103+
msg_ok "Completed Successfully!\n"
104+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
105+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
106+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

install/changedetection-install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ cat <<EOF >/etc/systemd/system/browserless.service
137137
Description=browserless service
138138
After=network.target
139139
[Service]
140+
Environment=CONNECTION_TIMEOUT=60000
140141
WorkingDirectory=/opt/browserless
141142
ExecStart=/opt/browserless/scripts/start.sh
142143
SyslogIdentifier=browserless

install/reactive-resume-install.sh

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: vhsdream
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://rxresu.me
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt-get install -y \
18+
gnupg \
19+
unzip \
20+
postgresql-common
21+
msg_ok "Installed Dependencies"
22+
23+
msg_info "Installing Additional Dependencies"
24+
mkdir -p /etc/apt/keyrings
25+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
26+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
27+
echo "YES" | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh &>/dev/null
28+
$STD apt-get install -y postgresql-16 nodejs
29+
cd /tmp
30+
curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio.deb -o minio.deb
31+
$STD dpkg -i minio.deb
32+
33+
msg_info "Setting up Database"
34+
DB_USER="rxresume"
35+
DB_NAME="rxresume"
36+
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
37+
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';"
38+
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
39+
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;"
40+
$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
41+
msg_ok "Set up Database"
42+
43+
msg_info "Installing ${APPLICATION}"
44+
MINIO_PASS=$(openssl rand -base64 48)
45+
ACCESS_TOKEN=$(openssl rand -base64 48)
46+
REFRESH_TOKEN=$(openssl rand -base64 48)
47+
CHROME_TOKEN=$(openssl rand -hex 32)
48+
LOCAL_IP=$(hostname -I | awk '{print $1}')
49+
TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
50+
RELEASE=$(curl -fsSL https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
51+
curl -fsSL "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -o v${RELEASE}.zip
52+
unzip -q v${RELEASE}.zip
53+
mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION}
54+
cd /opt/${APPLICATION}
55+
corepack enable
56+
export CI="true"
57+
export PUPPETEER_SKIP_DOWNLOAD="true"
58+
export NODE_ENV="production"
59+
export NEXT_TELEMETRY_DISABLED=1
60+
$STD pnpm install --frozen-lockfile
61+
$STD pnpm run build
62+
$STD pnpm install --prod --frozen-lockfile
63+
$STD pnpm run prisma:generate
64+
msg_ok "Installed ${APPLICATION}"
65+
66+
msg_info "Installing Browserless (Patience)"
67+
cd /tmp
68+
curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -o v${TAG}.zip
69+
unzip -q v${TAG}.zip
70+
mv browserless-${TAG} /opt/browserless
71+
cd /opt/browserless
72+
$STD npm install
73+
rm -rf src/routes/{chrome,edge,firefox,webkit}
74+
$STD node_modules/playwright-core/cli.js install --with-deps chromium
75+
$STD npm run build
76+
$STD npm run build:function
77+
$STD npm prune production
78+
msg_ok "Installed Browserless"
79+
80+
msg_info "Configuring applications"
81+
mkdir -p /opt/minio
82+
cat <<EOF >/opt/minio/.env
83+
MINIO_ROOT_USER="storageadmin"
84+
MINIO_ROOT_PASSWORD="${MINIO_PASS}"
85+
MINIO_VOLUMES=/opt/minio
86+
MINIO_OPTS="--address :9000 --console-address 127.0.0.1:9001"
87+
EOF
88+
cat <<EOF >/opt/${APPLICATION}/.env
89+
NODE_ENV=production
90+
PORT=3000
91+
PUBLIC_URL=http://${LOCAL_IP}:3000
92+
STORAGE_URL=http://${LOCAL_IP}:9000/rxresume
93+
DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}?schema=public
94+
ACCESS_TOKEN_SECRET=${ACCESS_TOKEN}
95+
REFRESH_TOKEN_SECRET=${REFRESH_TOKEN}
96+
CHROME_PORT=8080
97+
CHROME_TOKEN=${CHROME_TOKEN}
98+
CHROME_URL=ws://localhost:8080
99+
CHROME_IGNORE_HTTPS_ERRORS=true
100+
MAIL_FROM=noreply@locahost
101+
# SMTP_URL=smtp://username:password@smtp.server.mail:587 #
102+
STORAGE_ENDPOINT=localhost
103+
STORAGE_PORT=9000
104+
STORAGE_REGION=us-east-1
105+
STORAGE_BUCKET=rxresume
106+
STORAGE_ACCESS_KEY=storageadmin
107+
STORAGE_SECRET_KEY=${MINIO_PASS}
108+
STORAGE_USE_SSL=false
109+
STORAGE_SKIP_BUCKET_CHECK=false
110+
111+
# GitHub (OAuth, Optional)
112+
# GITHUB_CLIENT_ID=
113+
# GITHUB_CLIENT_SECRET=
114+
# GITHUB_CALLBACK_URL=http://localhost:5173/api/auth/github/callback
115+
116+
# Google (OAuth, Optional)
117+
# GOOGLE_CLIENT_ID=
118+
# GOOGLE_CLIENT_SECRET=
119+
# GOOGLE_CALLBACK_URL=http://localhost:5173/api/auth/google/callback
120+
EOF
121+
cat <<EOF >/opt/browserless/.env
122+
DEBUG=browserless*,-**:verbose
123+
HOST=localhost
124+
PORT=8080
125+
TOKEN=${CHROME_TOKEN}
126+
EOF
127+
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
128+
{
129+
echo "${APPLICATION} Credentials"
130+
echo "Database User: $DB_USER"
131+
echo "Database Password: $DB_PASS"
132+
echo "Database Name: $DB_NAME"
133+
echo "Minio Root Password: ${MINIO_PASS}"
134+
} >>~/${APPLICATION}.creds
135+
msg_ok "Configured applications"
136+
137+
msg_info "Creating Services"
138+
mkdir -p /etc/systemd/system/minio.service.d/
139+
cat <<EOF >/etc/systemd/system/minio.service.d/override.conf
140+
[Service]
141+
User=root
142+
Group=root
143+
WorkingDirectory=/usr/local/bin
144+
EnvironmentFile=/opt/minio/.env
145+
EOF
146+
147+
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
148+
[Unit]
149+
Description=${APPLICATION} Service
150+
After=network.target postgresql.service minio.service
151+
Wants=postgresql.service minio.service
152+
153+
[Service]
154+
WorkingDirectory=/opt/${APPLICATION}
155+
EnvironmentFile=/opt/${APPLICATION}/.env
156+
ExecStart=/usr/bin/pnpm run start
157+
Restart=always
158+
159+
[Install]
160+
WantedBy=multi-user.target
161+
EOF
162+
163+
cat <<EOF >/etc/systemd/system/browserless.service
164+
[Unit]
165+
Description=Browserless service
166+
After=network.target ${APPLICATION}.service
167+
168+
[Service]
169+
WorkingDirectory=/opt/browserless
170+
EnvironmentFile=/opt/browserless/.env
171+
ExecStart=/usr/bin/npm run start
172+
Restart=unless-stopped
173+
174+
[Install]
175+
WantedBy=multi-user.target
176+
EOF
177+
systemctl daemon-reload
178+
systemctl enable -q --now minio.service ${APPLICATION}.service browserless.service
179+
msg_ok "Created Services"
180+
181+
motd_ssh
182+
customize
183+
184+
msg_info "Cleaning up"
185+
rm -f /tmp/v${RELEASE}.zip
186+
rm -f /tmp/v${TAG}.zip
187+
rm -f /tmp/minio.deb
188+
$STD apt-get -y autoremove
189+
$STD apt-get -y autoclean
190+
msg_ok "Cleaned"
191+
192+
# Modified by surgeon https://github.com/bketelsen/surgeon

install/seelf-install.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ update_os
1616
msg_info "Installing Dependencies"
1717
$STD apt-get install -y \
1818
make \
19-
gcc
19+
gcc \
20+
gpg
2021
msg_ok "Installed Dependencies"
2122

2223
msg_info "Installing Golang"
@@ -43,8 +44,8 @@ msg_ok "Installed Node.js"
4344
msg_info "Setting up seelf. Patience"
4445
RELEASE=$(curl -fsSL https://api.github.com/repos/YuukanOO/seelf/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
4546
curl -fsSL "https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE}.tar.gz" -o $(basename "https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE}.tar.gz")
46-
tar -xzf v${RELEASE}.tar.gz
47-
mv seelf-${RELEASE}/ /opt/seelf
47+
tar -xzf v"${RELEASE}".tar.gz
48+
mv seelf-"${RELEASE}"/ /opt/seelf
4849
cd /opt/seelf
4950
$STD make build
5051
PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
@@ -84,12 +85,13 @@ customize
8485

8586
# Cleanup
8687
msg_info "Cleaning up"
87-
rm -f ~/v${RELEASE}.tar.gz
88-
rm -f $temp_file
88+
rm -f ~/v"${RELEASE}".tar.gz
89+
rm -f "$temp_file"
8990
$STD apt-get -y autoremove
9091
$STD apt-get -y autoclean
9192
msg_ok "Cleaned"
9293

9394
motd_ssh
9495
customize
96+
9597
# Modified by surgeon https://github.com/bketelsen/surgeon

install/wger-install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ update_os
1515

1616
msg_info "Installing Dependencies"
1717
$STD apt-get install -y \
18-
git \
19-
gnupg \
20-
apache2 \
21-
libapache2-mod-wsgi-py3
18+
git \
19+
gnupg \
20+
apache2 \
21+
libapache2-mod-wsgi-py3
2222
msg_ok "Installed Dependencies"
2323

2424
msg_info "Installing Python"

0 commit comments

Comments
 (0)