I’m having trouble wrapping my mind around the new ghost installation process. I used to have a ghost blog way back when you just downloaded and ran it. I already have nginx vhosts configured and ready to go. With SSL. They’re only waiting for appropraite proxy_pass
entries.
My goal is to have multiple (three) ghost instances running on a single server. What is the best way to do that?
My first thought was to create separate system and mysql accounts for each with homes in /srv. However, I cannot even get the regular installation process of a single ghost blog to run properly.
Every ghost install
attempt fails with
Running sudo command: /var/www/nanoghost/current/node_modules/.bin/knex-migrator-migrate --init --mgpath /var/www/nanoghost/current
✖ Running database migrations
A ProcessError occurred.
the /home/tenautomatix/.ghost/logs/ghost-cli-debug-2018-07-22T14_36_31_892Z.log
log contains only
Debug Information:
OS: Ubuntu, v18.04
Node Version: v8.11.3
Ghost-CLI Version: 1.8.1
Environment: production
Command: 'ghost install'
Message: The database migration in Ghost encountered an error.
Help: https://docs.ghost.org/v1/docs/troubleshooting#section-general-update-error
--------------- stderr ---------------
sudo: unable to execute /var/www/nanoghost/current/node_modules/.bin/knex-migrator-migrate: Permission denied
I can run this command successfully
tenautomatix@amber /var/www/nanoghost » sudo /var/www/nanoghost/current/node_modules/.bin/knex-migrator-migrate --init --mgpath /var/www/nanoghost/current 130 ↵
[2018-07-22 14:40:12] INFO Creating table: posts
[2018-07-22 14:40:12] INFO Creating table: users
[2018-07-22 14:40:12] INFO Creating table: posts_authors
[2018-07-22 14:40:12] INFO Creating table: roles
[2018-07-22 14:40:12] INFO Creating table: roles_users
[2018-07-22 14:40:12] INFO Creating table: permissions
[2018-07-22 14:40:12] INFO Creating table: permissions_users
[2018-07-22 14:40:12] INFO Creating table: permissions_roles
[2018-07-22 14:40:12] INFO Creating table: permissions_apps
[2018-07-22 14:40:12] INFO Creating table: settings
[2018-07-22 14:40:12] INFO Creating table: tags
[2018-07-22 14:40:12] INFO Creating table: posts_tags
[2018-07-22 14:40:12] INFO Creating table: apps
[2018-07-22 14:40:12] INFO Creating table: app_settings
[2018-07-22 14:40:12] INFO Creating table: app_fields
[2018-07-22 14:40:12] INFO Creating table: clients
[2018-07-22 14:40:12] INFO Creating table: client_trusted_domains
[2018-07-22 14:40:12] INFO Creating table: accesstokens
[2018-07-22 14:40:12] INFO Creating table: refreshtokens
[2018-07-22 14:40:12] INFO Creating table: subscribers
[2018-07-22 14:40:12] INFO Creating table: invites
[2018-07-22 14:40:12] INFO Creating table: brute
[2018-07-22 14:40:12] INFO Creating table: webhooks
[2018-07-22 14:40:13] INFO Model: Tag
[2018-07-22 14:40:13] INFO Model: Client
[2018-07-22 14:40:13] INFO Model: Role
[2018-07-22 14:40:13] INFO Model: Permission
[2018-07-22 14:40:13] INFO Model: User
[2018-07-22 14:40:13] INFO Model: Post
[2018-07-22 14:40:14] INFO Relation: Role to Permission
[2018-07-22 14:40:14] INFO Relation: Post to Tag
[2018-07-22 14:40:14] INFO Relation: User to Role
[2018-07-22 14:40:14] INFO Finished database migration!
(is there a spoiler tag here?)
but ghost doesn’t start
tenautomatix@amber /var/www/nanoghost » ghost start
Running sudo command: systemctl is-active ghost_nanodzialalnosc-pl
A ProcessError occurred.
Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#' systemctl is-active ghost_nanodzialalnosc-pl
failed
Exit code: 3
Because it encounters the same issue? Because it didn’t finish the installation?
‘ghost doctor’ has the same problem
Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#' systemctl is-active ghost_nanodzialalnosc-pl
failed
Exit code: 3
and returns commands to fix permissions which don’t help.
tenautomatix@amber /var/www/nanoghost » sudo find ./ -type d -exec chmod 00775 {} \;
tenautomatix@amber /var/www/nanoghost » sudo find ./ -type d -exec chmod 00775 {} \;
tenautomatix@amber /var/www/nanoghost » sudo find ./ -type d -exec chmod 00775 {} \;
What’s happening and how can I fix it? Is there a simpler, less brittle installation process available? I’d be happy to create the mysql users, etc by hand.