Update Ghost installation to Ubuntu 24.04 and modify service execution

This commit is contained in:
fabrice1236 2025-01-07 18:46:22 +01:00
parent 4e35e582eb
commit 6b92c3b6a9
3 changed files with 38 additions and 13 deletions

View File

@ -13,7 +13,7 @@ var_cpu="2"
var_ram="1024" var_ram="1024"
var_disk="4" var_disk="4"
var_os="ubuntu" var_os="ubuntu"
var_version="20.04" var_version="24.04"
var_unprivileged="1" var_unprivileged="1"
# App Output & Base Settings # App Output & Base Settings
@ -53,15 +53,5 @@ start
build_container build_container
description description
# Ensure the container is created before starting it
if pct status "$CT_ID" &>/dev/null; then
msg_info "Starting LXC Container"
pct start "$CT_ID"
msg_ok "Started LXC Container"
else
msg_error "Failed to create LXC Container"
exit 1
fi
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"

View File

@ -45,7 +45,6 @@ msg_ok "Set up Node.js Repository"
# Install Node.js (includes npm) # Install Node.js (includes npm)
msg_info "Installing Node.js" msg_info "Installing Node.js"
$STD apt-get update
$STD apt-get install -y nodejs $STD apt-get install -y nodejs
msg_ok "Installed Node.js" msg_ok "Installed Node.js"
@ -77,7 +76,9 @@ Description=${APPLICATION} Service
After=network.target After=network.target
[Service] [Service]
ExecStart=/usr/bin/ghost start Type=simple
Environment="NODE_ENV=production"
ExecStart=/usr/bin/node /usr/bin/ghost run
WorkingDirectory=/var/www/ghost WorkingDirectory=/var/www/ghost
User=ghost-user User=ghost-user
Group=ghost-user Group=ghost-user

34
json/ghost.json Normal file
View File

@ -0,0 +1,34 @@
{
"name": "Ghost",
"slug": "ghost",
"categories": [
12
],
"date_created": "2025-01-07",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 2368,
"documentation": "https://ghost.org/docs/",
"website": "https://ghost.org",
"logo": "https://raw.githubusercontent.com/TryGhost/Ghost/b6fe724b577e84f7dd174646d0323dabdcdf576e/apps/shade/src/assets/images/ghost-orb.svg",
"description": "Ghost is a powerful app for professional publishers to create, share, and grow a business around their content. It comes with modern tools to build a website, publish content, send newsletters & offer paid subscriptions to members.",
"install_methods": [
{
"type": "default",
"script": "ct/ghost.sh",
"resources": {
"cpu": 2,
"ram": 1024,
"hdd": 4,
"os": "Ubuntu",
"version": "24.04"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}