Hi,
I recently tried updating a local private LAN ghost instance from 5.68.0. When upgrading to anything past that version, my ghost instance fails to start due to a database.js error.
After further review of making sure all configuration values are correct and my config.production.json is in the right spot and correct, I am stumped. I added a console.log to the database.js file that is throwing the error so that it outputs the connection options.
In v5.68.0 I get the first image
In v5.98.0 I get the second image
Even thought when I execute all the ghost config commands I get the correct values.
ghost config database.client
- I get mysql
ghost config database.connection.database
- I get ghost
ghost config database.connection.host
- I get my_db_instance_ip
ghost config database.connection.password
- I get my_db_instance_pw
Any other ideas what my next step is?
I have closed issues where I detailed a bit more what happened, but any help would be greatly appreciated!
opened 04:00AM - 10 Sep 24 UTC
tech-issues
triage
ghost
### Name and Version
bitnami/ghost:5.68.0
### What architecture are you us… ing?
amd64
### What steps will reproduce the bug?
1. Using Unraid (or docker command line), pull and run the containers v5.68.0
2. Application will start and run,
![image](https://github.com/user-attachments/assets/62aae725-a8a8-47f6-964a-67a8ed221bbb)
3. Using Unraid (or docker command line), upgrade and pull the next version v5.69.0
4. Application has the same startup message but the container has exited
![image](https://github.com/user-attachments/assets/c6dc0dc3-4e8a-420d-b361-5d2f860bf0b3)
### What is the expected behavior?
I expected the upgrade to complete without any issues, I was on a 5.3.X and jumped to latest and it failed to start. I slowly tried differing versions until I came from the upgrade to 5.68.0 > 5.69.0 which is when it started to fail to start. I don't see any logs in the docker container logs and the container isn't ever on long enough for me to check the logs while it is running.
### What do you see instead?
The container fails to start once upgrading to 5.69.0
### Additional information
```
Docker Client:
Version: 20.10.21
API version: 1.41
Go version: go1.18.7
Git commit: baeda1f
Built: Tue Oct 25 17:56:30 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.21
API version: 1.41 (minimum version 1.12)
Go version: go1.18.7
Git commit: 3056208
Built: Tue Oct 25 18:02:03 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.6.9
GitCommit: 1c90a442489720eec95342e1789ee8a5e1b9536f
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d1
docker-init:
Version: 0.19.0
GitCommit: de40ad0
```
opened 09:43PM - 12 Sep 24 UTC
closed 09:55PM - 12 Sep 24 UTC
self hosting
### Issue Summary
Hi,
I am recently upgrading my ghost instance from 5.3X.… X, I assumed that I would be able to jump to the absolute latest without any issues but when pulling 5.9X.X ghost failed to start. I ended up trying different versions where it would work and eventually found [5.68.0](https://github.com/TryGhost/Ghost/releases/tag/v5.68.0) as the last working version with my setup. Every time I upgrade past it to any version, from 5.68.X - 5.94.X it fails to start.
Since I am running this in docker it took some modifying with a sleep infinity entrypoint so I could console in and manually start it, I ended up starting it with debug using `ghost run -D!` which printed out some useful errors stating that SQLITE_CANTOPEN: Unable to open the database file, Unknown Database error which pointed to a node_modules/knex-migrator/lib/database.js file. I ended up modifying that file to console.log the connect client options, and it states that it is using sqlite3. After the command failed, I ran `` ghost config database.client` and got the message that it is using "mysql", so I have no clue why it is trying to initialize using sqlite3.
Looks like some config changed between v5.68.0 and v5.69.0 which is causing my instance to break. I've include a screenshot of it running the ghost run -D! command as well as my environment variables. Everything works fine under that version of 5.68.0 and below, it is just the upgrade here. The volumes and env vars are the same between the two versions.
![image](https://github.com/user-attachments/assets/a69e3d23-1cb3-49b5-9372-7d8400e9f6b9)
![image](https://github.com/user-attachments/assets/9c0c6a04-0c84-4f46-9c1a-6ac48ebd96d6)
P.S. I initially filed this issue at the wrong location, there is a little more background here if needed. https://github.com/bitnami/containers/issues/72308
### Steps to Reproduce
1. Upgrade ghost to any tag version >= 5.69.0 (used 5.94.0 for testing purposes)
2. Ghost fails to start when using `ghost run -D!` with a database error
3. Revert back to version 5.68.0 or below
4. Ghost starts and runs normally without any issues
### Ghost Version
5.94.0
### Node.js Version
20.X
### How did you install Ghost?
Docker
### Database type
Other
### Browser & OS version
_No response_
### Relevant log / error output
_No response_
### Code of Conduct
- [X] I agree to be friendly and polite to people in this repository