diff --git a/ct/ghost.sh b/ct/ghost.sh index 11afa79c..354fde0b 100644 --- a/ct/ghost.sh +++ b/ct/ghost.sh @@ -11,7 +11,7 @@ APP="Ghost" var_tags="cms;blog" var_cpu="2" var_ram="1024" -var_disk="4" +var_disk="5" var_os="ubuntu" var_version="22.04" var_unprivileged="1" @@ -30,7 +30,6 @@ function update_script() { check_container_storage check_container_resources msg_info "Updating ${APP} LXC" - # CHECK FOR NPM HERE ! if command -v ghost &> /dev/null; then current_version=$(ghost --version | awk '{print $2}') #TO REVIEW @@ -54,4 +53,6 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file +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}:2368${CL}" \ No newline at end of file diff --git a/install/ghost-install.sh b/install/ghost-install.sh index 3b295ffc..41dc4499 100644 --- a/install/ghost-install.sh +++ b/install/ghost-install.sh @@ -60,6 +60,7 @@ msg_ok "Installed Ghost CLI" msg_info "Creating ghost-user" $STD adduser --disabled-password --gecos "Ghost user" ghost-user $STD usermod -aG sudo ghost-user +echo "ghost-user ALL=(ALL) NOPASSWD: /usr/bin/ghost" | tee /etc/sudoers.d/ghost-user msg_ok "Created ghost-user" # Set up Ghost @@ -67,30 +68,10 @@ msg_info "Setting up Ghost" mkdir -p /var/www/ghost chown -R ghost-user:ghost-user /var/www/ghost chmod 775 /var/www/ghost -sudo -u ghost-user -H sh -c "cd /var/www/ghost && ghost install --db=mysql --dbhost=localhost --dbuser=root --dbpass=ghost --dbname=ghost --url=http://localhost:2368 --no-prompt --no-setup-nginx --no-setup-ssl --no-setup-mysql --no-start" +sudo -u ghost-user -H sh -c "cd /var/www/ghost && ghost install --db=mysql --dbhost=localhost --dbuser=root --dbpass=ghost --dbname=ghost --url=http://localhost:2368 --no-prompt --no-setup-nginx --no-setup-ssl --no-setup-mysql --enable --start --ip 0.0.0.0" +rm /etc/sudoers.d/ghost-user #Remove ghost-user for sudoers after setup (not required anymore) msg_ok "Ghost setup completed" -# Creating Service (if needed) -# msg_info "Creating Service" -# cat </etc/systemd/system/${APPLICATION}.service -# [Unit] -# Description=${APPLICATION} Service -# After=network.target - -# [Service] -# Type=simple -# Environment="NODE_ENV=production" -# ExecStart=/usr/bin/node /usr/bin/ghost run -# WorkingDirectory=/var/www/ghost -# User=ghost-user -# Group=ghost-user -# Restart=always - -# [Install] -# WantedBy=multi-user.target -# EOF -# systemctl enable -q --now ${APPLICATION}.service -# msg_ok "Created Service" motd_ssh customize diff --git a/json/ghost.json b/json/ghost.json index 79b79585..c0e730ba 100644 --- a/json/ghost.json +++ b/json/ghost.json @@ -20,7 +20,7 @@ "resources": { "cpu": 2, "ram": 1024, - "hdd": 4, + "hdd": 5, "os": "Ubuntu", "version": "24.04" }