Ghost CMS Deployment on Railway

pearcyHOBBY

8 months ago

Hey everyone,

I'm working on self-hosting a Ghost CMS using a starter Ghost CMS from my own GitHub repository, which I've cloned from the official Ghost Starter repo: https://github.com/TryGhost/Starter.

Here’s my setup:

1. Project: Ghost CMS, based on the Starter theme, hosted on Railway.

2. Deployment method: Self-hosting using Railway, with the source code pulled directly from my GitHub repo.

### Current Issue

The deployment is failing during the yarn install --frozen-lockfile step. Here’s what the logs show:

```

#11 2.148 error Your lockfile needs to be updated, but yarn was run with --frozen-lockfile.

#11 2.148 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

#11 ERROR: process "/bin/bash -ol pipefail -c yarn install --frozen-lockfile" did not complete successfully: exit code: 1

```

It seems that the lockfile needs updating, but I'm running into issues because the install process is being forced to use a frozen lockfile, which blocks the build.

### Relevant package.json Snippet

```

{

"name": "ghost-starter-theme",

"version": "1.0.0",

"description": "A starter theme for Ghost theme development",

"private": true,

"scripts": {

"start": "ghost run",

"build": "rollup -c --environment BUILD:production",

"dev": "rollup -c --environment BUILD:development -w"

},

"dependencies": {

"ghost": "^5.x",

"mysql2": "^2.3.3"

},

"devDependencies": {

"ghost-cli": "^1.21.0",

"rollup": "^3.18.0"

}

}

```

### What I Need Help With

- Given that I'm using the starter Ghost CMS repo, do I need to update the lockfile, or is there something else I should be doing differently to avoid this error?

- Am I missing anything essential in my deployment setup for Railway when self-hosting without Docker?
-- I was able to deploy a working version using the Railway templates but, as mentioned, need to deploy this from my Git repo so I can edit, update, etc.

Any advice or insights would be greatly appreciated! Thanks in advance for your help.

Solved

1 Replies


Status changed to Solved brody 8 months ago