Chevereto
阅读量: 101
阅读人次: 102
Chevereto 是一个自托管的多用途多用户,功能齐全的媒体共享解决方案。 围绕用户共享媒体内容的概念,它可以用于创建各种应用程序或增强现有系统的功能。
mkdir -p /mnt/user/appdata/chevereto/_assets
docker run -d --restart=unless-stopped \
--name chevereto \
-p 8999: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 \
-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
加入评论功能
我们选择 Twikoo 做为网站评论系统,Twikoo 的后台服务搭建可参考这里。参考前端部署在 Chevereto 的 设置 ➡ 外部服务 的 评论 API 选择 JavaScript/HTML,然后在下方的 评论代码加入:
<div id="tcomment"></div>
<script src="https://cdn.jsdelivr.net/npm/twikoo@1.6.44/dist/twikoo.all.min.js"></script>
<script>
twikoo.init({
envId: 'https://your_website/twikoo', // 后端地址
el: '#tcomment', // 容器元素
});
</script>
打开图片,就可以看到下方有评论功能了。
镜像构建
当初是在闲鱼和人拼单买的付费版,自行构建 Docker 镜像,这个镜像构建出来后可以一直使用,只是后续授权码到期之后,无法享受版本更新而已。
-
拉取 chevereto/docker 仓库:
git clone https://github.com/chevereto/docker.git -
在根目录创建
.env文件,填入授权码密钥:.envCHEVERETO_LICENSE_KEY=your_license_key -
构建:
make image