third time from scratch. worth it

by Aizan Fahri

My fingers were drenched in sweat (and blood.. typing commands and codes is no joke). I continued Ghost deployment today to fix several maddening issues (thank god Ghost didn’t haunt my sleep last night). This time, rather than using Amazon Linux AMI, I switched to Ubuntu and I felt better working on OS that I know ins and outs.

Moving on. Last night I wrote that I couldn’t get Forever and Ghost running properly, and today I uncovered why. A pesky permission issue with sqlite. Linux and permission issue can’t part. Forever mingling. I didn’t notice this permission issue because I didn’t bother looking at Forever‘s log. So, how did I catch that?

PM2. I was looking for Forever‘s alternative, and bumped into a much elegant script kickstarter, that is PM2. I fell in love with its interface (but I hated it right the seconds after PM2 failed too). This is the interface of the simpleton Forever.

the simpleton forever

Wanna something saliva dripping? Look at this PM2.

pm2 elegant

Better? Yes, much better. By taking a deep ponder into this status check, it came to me that PM2 developer(s) might have thought that each script that runs under PM2’s influence prone to error, so that’s why path to err logs included right after you summon PM2. Legit argument? I think so.

On the first attempt waking up Ghost by using PM2, it resulted in vain. Checked the log, found the culprit.

readonly write attempt

For the next attempt, I gave another try with Forever by running sudo forever start index.js, and sorcery happened. Ghost was up and running. Stopped Forever, cleared PM2 logs and re-ran it again with sudo pm2 start index.js and.. no luck. Checked the log and tadaa, a recurring issue among PM2 users. I lodged a report already on GitHub.

pm 2 error report

Theming on Ghost

Installed a new theme on Ghost, but core didn’t register the theme pack. Restarting Ghost is the only option (seems like that, for now). I hope that the next version of Ghost could add watcher inside the theme folder. When the watcher awares of changes, something will run a check on it and register the changes to core if a new theme is spotted.

Closing Word

Done with installation issues, moving to roll my Ghost by attaching NightlyArt subdomain on it. FYI, I’m working on Amazon EC2 Asia Pacific Region, running on Ubuntu 12.04 LTS Precise Pangolin.

– Aizan Fahri, Malaysia.

Advertisements