I've spent a moment migrating this blog from my Debian machine to a new Alpine machine on a new server. Since this is not a supported platform for Ghost I ran into a few issues. Debian was also not supported but at least the installer integrates with systemd and nginx properly to set everything up.

For Alpine you have to manually configure nginx and openrc to proxy and run the nodejs application. One of the upsides of Alpine is that nodejs is very well supported. The first step is installing the required dependencies:

$ sudo apk add curl nodejs npm mariadb mariadb-client nginx shadow
$ sudo npm install ghost-cli@latest -g

Now the setup steps for ghost can continue like they normally would, except that it fails to set-up nginx since paths are different and you manually have to make the openrc service.

$ useradd ghost
$ mkdir /var/www/ghost
$ cd /var/www/ghost
$ chown ghost:ghost .
$ sudo -u ghost ghost install

After this has sucessfully failed the nginx config file can be created

$ vim /etc/nginx/conf.d/ghost.conf
server {
        listen 80;
        listen [::]:80;

        server_name blog.brixit.nl;

        location / {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header HOST $http_host;
                proxy_set_header X-NginX-Proxy true;
                proxy_pass http://127.0.0.1:2368;
                proxy_redirect off;
        }

}

# Set up your ssl here if needed

And to make ghost itself run make a openrc service for it:

$ vim /etc/init.d/ghost
#!/sbin/openrc-run

command="/usr/bin/node"
directory="/var/www/ghost"
command_args="/usr/bin/ghost run"
command_background="yes"
command_user="ghost:ghost"
pidfile="/run/${RC_SVCNAME}.pid"
output_log="/var/log/${RC_SVCNAME}.log"
error_log="/var/log/${RC_SVCNAME}.log"

depend() {
        use net
}

$ chmod +x /etc/init.d/ghost

Now everything should be in place to run your blog. The last step is enableing and starting the services:

$ rc-update add nginx
$ rc-update add ghost
$ service nginx start
$ service ghost start