Hello,
I used portainer on my Synology to deploy a stack for ghost.
Issue is as soon as it starts the ghost docker instance immediately stops with the following error(s)
"Please double check your database config."
Error ID:
500
Error Code:
ETIMEDOUT
----------------------------------------
DatabaseError: Invalid database host.
at DatabaseStateManager.getState (/var/lib/ghost/versions/4.48.8/core/server/data/db/state-manager.js:64:32)
at DatabaseError.KnexMigrateError (/var/lib/ghost/versions/4.48.8/node_modules/knex-migrator/lib/errors.js:7:26)
at new DatabaseError (/var/lib/ghost/versions/4.48.8/node_modules/knex-migrator/lib/errors.js:55:26)
at /var/lib/ghost/versions/4.48.8/node_modules/knex-migrator/lib/database.js:50:23
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async DatabaseStateManager.getState (/var/lib/ghost/versions/4.48.8/core/server/data/db/state-manager.js:40:13)
at async DatabaseStateManager.makeReady (/var/lib/ghost/versions/4.48.8/core/server/data/db/state-manager.js:73:25)
at async initDatabase (/var/lib/ghost/versions/4.48.8/core/boot.js:69:5)
at async bootGhost (/var/lib/ghost/versions/4.48.8/core/boot.js:414:9)
Error: connect ETIMEDOUT
at Connection._handleTimeoutError (/var/lib/ghost/versions/4.48.8/node_modules/mysql2/lib/connection.js:189:17)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
The docker compose file I used was this:
version: '3.1'
services:
ghost:
image: ghost:4-alpine
restart: always
ports:
- 9577:2368
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: xxxxx
database__connection__database: ghost
# this url value is just an example, and is likely wrong for your environment!
url: https://....com
# contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
#NODE_ENV: development
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: xxxxx
Any idea what going on?
Thanks,
William