使用sqlite启动docker应用ghost
ghost在之前更新到5之后就默认是用mysql,然而这导致在docker-compose.yml
中写非常麻烦,还需要设置端口,管理员和博客数据库密码。其实还是可以沿用之前的sqlite的,而且非常简单,docker-compose.yml
如下:
version: '3.8'
services:
ghost:
image: ghost:latest
container_name: ghost
restart: unless-stopped
ports:
- "2368:2368"
volumes:
- /vol1/1000/docker/ghost:/var/lib/ghost/content
environment:
url: http://localhost:2368
database__client: sqlite3
database__connection__filename: /var/lib/ghost/content/data/ghost.db
database__useNullAsDefault: "true"
database__debug: "false"
docker up
启完之后访问localhost:2368/ghost
就可以进入配置页面,配置站点信息和账号密码了。非常方便
- 本文标题:使用sqlite启动docker应用ghost
- 本文作者:uygnil
- 本文链接:https://blog.zhoulingyu.net/index.php/archives/14/
- 版权声明:本文采用 CC BY 4.0 协议进行许可
标签:无