Skip to content

Commit 2c46695

Browse files
push-app-to-main[bot]michelroegl-brunnerMickLesk
authored
reactive-resume (#3980)
* 'Add new script' * Update reactive-resume.sh * Update reactive-resume-install.sh * fssl * fssl * date --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Michel Roegl-Brunner <[email protected]> Co-authored-by: CanbiZ <[email protected]>
1 parent f46c300 commit 2c46695

File tree

3 files changed

+330
-0
lines changed

3 files changed

+330
-0
lines changed

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}"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "Reactive Resume",
3+
"slug": "reactive-resume",
4+
"categories": [
5+
12
6+
],
7+
"date_created": "2025-04-22",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 3000,
12+
"documentation": "https://docs.rxresu.me/",
13+
"website": "https://rxresu.me",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/reactive-resume-light.png",
15+
"description": "A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/reactive-resume.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 3072,
23+
"hdd": 8,
24+
"os": "Debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": []
34+
}

install/reactive-resume-install.sh

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
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:[email protected]: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"

0 commit comments

Comments
 (0)