mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-28 09:55:53 +00:00
Compare commits
3 Commits
delete_fil
...
delete_fil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12a823436c | ||
|
|
58e8dfbd49 | ||
|
|
60a3ca6f25 |
62
ct/strapi.sh
62
ct/strapi.sh
@@ -1,62 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main}"
|
|
||||||
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/build.func")
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: pespinel
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
||||||
# Source: https://strapi.io/
|
|
||||||
|
|
||||||
APP="Strapi"
|
|
||||||
var_tags="${var_tags:-cms}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-4096}"
|
|
||||||
var_disk="${var_disk:-8}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -f /etc/systemd/system/strapi.service ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
NODE_VERSION="24" setup_nodejs
|
|
||||||
|
|
||||||
msg_info "Stopping Strapi"
|
|
||||||
systemctl stop strapi
|
|
||||||
msg_ok "Stopped Strapi"
|
|
||||||
|
|
||||||
msg_info "Updating Strapi"
|
|
||||||
cd /opt/strapi
|
|
||||||
$STD npm install
|
|
||||||
msg_ok "Updated Strapi"
|
|
||||||
|
|
||||||
msg_info "Building Strapi"
|
|
||||||
export NODE_OPTIONS="--max-old-space-size=3072"
|
|
||||||
$STD npm run build
|
|
||||||
msg_ok "Built Strapi"
|
|
||||||
|
|
||||||
msg_info "Starting Strapi"
|
|
||||||
systemctl start strapi
|
|
||||||
msg_ok "Started Strapi"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:1337${CL}"
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Strapi",
|
|
||||||
"slug": "strapi",
|
|
||||||
"categories": [
|
|
||||||
12
|
|
||||||
],
|
|
||||||
"date_created": "2026-02-17",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": true,
|
|
||||||
"privileged": false,
|
|
||||||
"interface_port": 1337,
|
|
||||||
"documentation": "https://docs.strapi.io/",
|
|
||||||
"website": "https://strapi.io/",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/strapi.webp",
|
|
||||||
"config_path": "/opt/strapi/.env",
|
|
||||||
"description": "Strapi is a leading open-source headless CMS that enables developers to build powerful APIs quickly. It features a flexible content structure with customizable content types, supporting both REST and GraphQL APIs. The intuitive admin panel allows non-technical users to manage content easily, while developers can extend functionality through plugins. Built on Node.js, Strapi offers role-based access control, media library management, and internationalization support out of the box.",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/strapi.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 2,
|
|
||||||
"ram": 4096,
|
|
||||||
"hdd": 8,
|
|
||||||
"os": "debian",
|
|
||||||
"version": "13"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": null,
|
|
||||||
"password": null
|
|
||||||
},
|
|
||||||
"notes": [
|
|
||||||
{
|
|
||||||
"text": "First-time setup requires creating an admin account at http://IP:1337/admin",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "Default installation uses SQLite. For production use, consider configuring PostgreSQL or MySQL.",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "Building the admin panel requires 4GB RAM. Container may take 10-15 minutes to fully initialize.",
|
|
||||||
"type": "warning"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -22,7 +22,7 @@ fetch_and_deploy_gh_release "booklore" "booklore-app/BookLore" "tarball"
|
|||||||
|
|
||||||
msg_info "Building Frontend"
|
msg_info "Building Frontend"
|
||||||
cd /opt/booklore/booklore-ui
|
cd /opt/booklore/booklore-ui
|
||||||
$STD npm install --omit=dev --legacy-peer-deps
|
$STD npm ci
|
||||||
$STD npm run build --configuration=production
|
$STD npm run build --configuration=production
|
||||||
msg_ok "Built Frontend"
|
msg_ok "Built Frontend"
|
||||||
|
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: pespinel
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://strapi.io/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apt install -y \
|
|
||||||
build-essential \
|
|
||||||
python3 \
|
|
||||||
python3-setuptools \
|
|
||||||
libvips42
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
NODE_VERSION="24" setup_nodejs
|
|
||||||
|
|
||||||
msg_info "Installing Strapi (Patience)"
|
|
||||||
mkdir -p /opt/strapi
|
|
||||||
cd /opt/strapi
|
|
||||||
$STD npx --yes create-strapi-app@latest . --quickstart --no-run --skip-cloud
|
|
||||||
msg_ok "Installed Strapi"
|
|
||||||
|
|
||||||
msg_info "Building Strapi"
|
|
||||||
cd /opt/strapi
|
|
||||||
export NODE_OPTIONS="--max-old-space-size=3072"
|
|
||||||
$STD npm run build
|
|
||||||
msg_ok "Built Strapi"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<EOF >/opt/strapi/.env
|
|
||||||
HOST=0.0.0.0
|
|
||||||
PORT=1337
|
|
||||||
APP_KEYS=$(openssl rand -base64 32)
|
|
||||||
API_TOKEN_SALT=$(openssl rand -base64 32)
|
|
||||||
ADMIN_JWT_SECRET=$(openssl rand -base64 32)
|
|
||||||
TRANSFER_TOKEN_SALT=$(openssl rand -base64 32)
|
|
||||||
JWT_SECRET=$(openssl rand -base64 32)
|
|
||||||
EOF
|
|
||||||
cat <<EOF >/etc/systemd/system/strapi.service
|
|
||||||
[Unit]
|
|
||||||
Description=Strapi CMS
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=/opt/strapi
|
|
||||||
EnvironmentFile=/opt/strapi/.env
|
|
||||||
ExecStart=/usr/bin/npm run start
|
|
||||||
Restart=on-failure
|
|
||||||
Environment=NODE_ENV=production
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now strapi
|
|
||||||
msg_ok "Created Service"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
Reference in New Issue
Block a user