Hi,
When I install and deploying ghost I have no problem, I created some article smoothly.
but after a while when ghost don’t have any request and when I try to load the blog, I have this error:
[2023-02-02 09:10:36] ERROR
CODE: ECONNREFUSED
MESSAGE: connect ECONNREFUSED 127.0.0.1:3306
Error: connect ECONNREFUSED 127.0.0.1:3306
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
After the first attempt to load the blog ghost reload and can connect with any problem to Mysql and the blog is working again.
I also have no error on Mysql.
I have Mysql on docker and ghost in the host (Raspberry Pi 3 Model B Rev 1.2)
This is my docker-compose:
mysql:
image: mysql:8
restart: always
command: mysqld --default-authentication-plugin=mysql_native_password
ports:
- "3306:3306"
volumes:
- ./ghost-db/:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: xxxx
My config.production.json
"url": "https://blog.nextmiracle.eu",
"server": {
"port": 8081,
"host": "127.0.0.1"
},
"database": {
"client": "mysql",
"connection": {
"host": "127.0.0.1",
"user": "root",
"password": "xxxx",
"database": "ghost"
}
},
"mail": {
"transport": "Direct",
"options": {
"service": "Mailgun",
"host": "xxxx",
"port": 587,
"secure": false,
"auth": {
"user": "xxxx",
"pass": "xxxx"
}
}
},
"logging": {
"transports": [
"file",
"stdout"
]
},
"process": "systemd",
"paths": {
"contentPath": "/home/xxx/ghost/ghost-web/content"
}
}
With latest Ghost: 5.33.3, Node: v16.19.0, Npm: 9.3.1
and my system is up to date with the latest rasbian kernel
Any help / though will be appreciate