From 6b92c3b6a96657cfd0090f0adabad3c4249daee3 Mon Sep 17 00:00:00 2001 From: fabrice1236 Date: Tue, 7 Jan 2025 18:46:22 +0100 Subject: [PATCH] Update Ghost installation to Ubuntu 24.04 and modify service execution --- ct/ghost.sh | 12 +----------- install/ghost-install.sh | 5 +++-- json/ghost.json | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 json/ghost.json diff --git a/ct/ghost.sh b/ct/ghost.sh index 316fbf71..d8395e98 100644 --- a/ct/ghost.sh +++ b/ct/ghost.sh @@ -13,7 +13,7 @@ var_cpu="2" var_ram="1024" var_disk="4" var_os="ubuntu" -var_version="20.04" +var_version="24.04" var_unprivileged="1" # App Output & Base Settings @@ -53,15 +53,5 @@ start build_container 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" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file diff --git a/install/ghost-install.sh b/install/ghost-install.sh index 35d40670..f08ffd78 100644 --- a/install/ghost-install.sh +++ b/install/ghost-install.sh @@ -45,7 +45,6 @@ msg_ok "Set up Node.js Repository" # Install Node.js (includes npm) msg_info "Installing Node.js" -$STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" @@ -77,7 +76,9 @@ Description=${APPLICATION} Service After=network.target [Service] -ExecStart=/usr/bin/ghost start +Type=simple +Environment="NODE_ENV=production" +ExecStart=/usr/bin/node /usr/bin/ghost run WorkingDirectory=/var/www/ghost User=ghost-user Group=ghost-user diff --git a/json/ghost.json b/json/ghost.json new file mode 100644 index 00000000..79b79585 --- /dev/null +++ b/json/ghost.json @@ -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": [] + } \ No newline at end of file