I’ve been running ghost since 0.x with docker and recently upgraded successfully to 1.x. Now I wanted to update to version 2 but the only instructions I find us using ghost-cli which I’m pretty sure I didn’t use before. My notes on previous installs are unfortunately in my ghost blog which is currently dead :)
I had no success trying to use the new docker image directly to upgrade, it just fails, but I figured I could probably just use the ghost-cli on the file area, is this possible?
When trying that:
root@f37715dec0f8:/ghost/content# ls -lFa
total 0
drwxrwxrwx+ 1 node node 64 Aug 24 06:28 ./
drwxrwxrwx+ 1 1001 99 108 Aug 24 07:23 ../
drwxr-xr-x+ 1 node node 0 Jan 24 2018 apps/
drwxr-xr-x+ 1 node node 202 Aug 24 06:43 data/
drwxr-xr-x+ 1 node node 34 Jan 31 2018 images/
drwxr-xr-x+ 1 node node 2412 Aug 24 06:27 logs/
drwxr-xr-x+ 1 node node 22 Aug 24 06:28 settings/
drwxr-xr-x+ 1 node node 12 Jan 31 2018 themes/
root@f37715dec0f8:/ghost/content# ghost update
Working directory is not a recognisable Ghost installation.
Please run `ghost update` again within a folder where Ghost was installed with Ghost-CLI.
Well, I never installed anything with ghost-cli. I can’t seem to find any instructions on how to upgrade in my case. Any help highly appreciated. I know the docker thing is not the official supported setup, but pretty please?
Additional info for completeness, probably not relevant, but you never know:
So I have all the ghost data on a NAS mounted on a host Ubuntu machine. I’ve been running ghost 1.x with a docker-compose just like this:
version: '2.0'
services:
ghost:
#image: ghost:1-alpine
image: ghost:2-alpine
container_name: blog
ports:
- 2368:2368
volumes:
- /var/lib/ghost/content:/var/lib/ghost/content
environment:
- url=https://blog.woodenstake.se # Otherwise internal links go to localhost:2368
restart: unless-stopped
First I got the feeling the new image had some auto-update thing (ghost/update.sh at 3557ab61ea77fef9e6894ff5eff85c340ab5707e · docker-library/ghost · GitHub) so I just tried upping the version number, but that failed miserably. It seemed to make a json backup though so I’m not really that afraid I lost my data:
viktor@i7:/var/lib/ghost/content$ ls -lFa data/
total 976
drwxr-xr-x+ 1 viktor viktor 202 Aug 24 08:43 ./
drwxrwxrwx+ 1 viktor viktor 64 Aug 24 08:28 ../
-rw-r--r--+ 1 viktor viktor 565248 Aug 24 08:34 ghost.db
-rw-rw-rw-+ 1 viktor viktor 213516 Aug 24 08:33 the-wooden-stake.ghost.2018-08-24.json