Last active
July 15, 2025 16:19
-
-
Save kerryhatcher/37aa3d5d1ba6408dc3acd991d4ee347c to your computer and use it in GitHub Desktop.
Ghost Setup Notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| echo "what is the sitename?" | |
| read sitename | |
| sudo mkdir -p "/var/www/$sitename" | |
| sudo chown kwhatcher:kwhatcher "/var/www/$sitename" | |
| sudo chmod 775 "/var/www/$sitename" | |
| cd "/var/www/$sitename" | |
| ghost install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| sudo apt update | |
| sudo apt upgrade | |
| sudo mkdir -p /etc/apt/keyrings | |
| curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg | |
| # Create deb repository | |
| NODE_MAJOR=20 # Use a supported version | |
| echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list | |
| # Run update and install | |
| sudo apt update | |
| sudo apt install -y nginx ca-certificates curl gnupg nodejs | |
| sudo ufw allow 'Nginx Full' | |
| sudo npm install ghost-cli@latest -g | |
| while true; do | |
| read -p "Do you want to install mysql-server (y/n) " yn | |
| case $yn in | |
| [yY] ) echo ok, we will proceed; | |
| sudo apt install -y mysql-server; | |
| break;; | |
| [nN] ) echo install mysql-client instead...; | |
| sudo apt install mysql-client-core-8.0; | |
| break;; | |
| * ) echo invalid response;; | |
| esac | |
| done | |
| echo complete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment