Chevereto
阅读量: 101
阅读人次: 102
今天是中秋节,祝大家,也祝自己中秋节快乐!
如果自己想搭建图床应用,有几个还算能用的选择。(毕竟免费的,不要挑剔,能用就行)
Chevereto
Chevereto 是一个自托管的多用途多用户,功能齐全的媒体共享解决方案。 围绕用户共享媒体内容的概念,它可以用于创建各种应用程序或增强现有系统的功能。
mkdir -p /mnt/user/appdata/chevereto/_assets
docker run -d --restart=unless-stopped \
--name chevereto \
-p 8089:80 \
-e PUID=1000 \
-e PGID=100 \
-e CHEVERETO_DB_HOST=your_db_server \
-e CHEVERETO_DB_PORT=3306 \
-e CHEVERETO_DB_USER=database_user \
-e CHEVERETO_DB_PASS='database_user_password' \
-e CHEVERETO_DB_NAME=chevereto \
-e CHEVERETO_ASSET_STORAGE_TYPE=local \
-e CHEVERETO_ASSET_STORAGE_URL=/images/_assets/ \
-e CHEVERETO_ASSET_STORAGE_BUCKET=/var/www/html/images/_assets/ \
-e CHEVERETO_MAX_POST_SIZE=2G \
-e CHEVERETO_MAX_UPLOAD_SIZE=2G \
-e CHEVERETO_HTTPS=1 \
-e CHEVERETO_SERVICING=server \ # 如果是付费版则不需要此变量
-v /mnt/user/appdata/chevereto:/var/www/html/images \
ghcr.io/chevereto/chevereto:latest
docker exec chevereto chown -R www-data /var/www/html/images
如果购买付费版,则可自行构建 Docker 镜像,这个镜像构建出来后可以一直使用,只是后续授权码到期之后,无法享受版本更新而已。
加入评论功能
我们选择 Twikoo 做为网站评论系统,Twikoo 的后台服务搭建可参考这里。在 设置 ➡ 外部服务 的 评论 API 选择 JavaScript/HTML,然后在下方的 评论代码加入:
<div id="tcomment"></div>
<script src="https://cdn.jsdelivr.net/npm/twikoo@1.6.39/dist/twikoo.all.min.js"></script>
<script>
twikoo.init({
envId: 'https://your_website/twikoo', // 后端地址
el: '#tcomment', // 容器元素
});
</script>
打开图片,就可以看到下方有评论功能了。

