mirror of https://github.com/jkjoy/hugoblog.git
147 lines
3.0 KiB
Markdown
147 lines
3.0 KiB
Markdown
---
|
||
title: "Moments:一个仿微信朋友圈项目"
|
||
slug: "moments_as_wechat_friends"
|
||
categories:
|
||
- 分享
|
||
tags:
|
||
- Moments
|
||
date: 2024-05-06T19:42:55+08:00
|
||
---
|
||
## 项目简介
|
||
|
||
本项目是由`mblog`的作者最新开发的仿微信朋友圈的微博,基于NEXTJS+SQLITE3.
|
||
目前正在快速迭代更新中..
|
||
|
||
- 支持匿名评论/点赞
|
||
- 支持引入网易云音乐,b站视频,插入链接等
|
||
- 支持自定义头图,个人头像,网站标题等
|
||
- 支持上传图片到S3兼容的云存储,支持本地存储
|
||
- 适配手机
|
||
- 支持暗黑模式
|
||
- 数据库采用sqlite,可随时备份
|
||
- 支持引入豆瓣读书/豆瓣电影,样式来源于这里
|
||
|
||
## 项目地址
|
||
|
||
https://github.com/kingwrcy/moments
|
||
|
||
## 预览
|
||
|
||
![预览][1]
|
||
|
||
## 部署步骤
|
||
|
||
建议使用Docker Compose方式部署
|
||
|
||
```
|
||
mkdir /home/moments
|
||
cd /home/moments
|
||
nano docker-compose.yaml
|
||
|
||
```
|
||
|
||
复制以下内容粘贴
|
||
|
||
```
|
||
version: '3'
|
||
services:
|
||
moments:
|
||
image: kingwrcy/moments:latest
|
||
ports:
|
||
- "3000:3000"
|
||
volumes:
|
||
- ./data:/app/data
|
||
- /etc/localtime:/etc/localtime:ro
|
||
- /etc/timezone:/etc/timezone:ro
|
||
- ./config.properties:/app/data/config.properties:ro
|
||
|
||
```
|
||
|
||
然后
|
||
|
||
```
|
||
nano config.properties
|
||
|
||
```
|
||
|
||
把以下内容复制粘贴
|
||
|
||
```
|
||
# 站点url包括http/https
|
||
NUXT_PUBLIC_SITE_URL=
|
||
#是否启用评论
|
||
NUXT_PUBLIC_MOMENTS_COMMENT_ENABLE=true
|
||
#是否显示评论
|
||
NUXT_PUBLIC_MOMENTS_SHOW_COMMENT=true
|
||
#评论最大字数
|
||
NUXT_PUBLIC_MOMENTS_COMMENT_MAX_LENGTH=120
|
||
#评论的显示顺序,desc:倒序,asc:顺序
|
||
NUXT_PUBLIC_MOMENTS_COMMENT_ORDER_BY=desc
|
||
#是否显示引入豆瓣读书/视频按钮
|
||
NUXT_PUBLIC_MOMENTS_TOOLBAR_ENABLE_DOUBAN=true
|
||
#是否显示引入网易云音乐按钮
|
||
NUXT_PUBLIC_MOMENTS_TOOLBAR_ENABLE_MUSIC163=true
|
||
#是否显示引入youtube,b站,在线视频按钮
|
||
NUXT_PUBLIC_MOMENTS_TOOLBAR_ENABLE_VIDEO=true
|
||
#单条发言最大行数,最大10行
|
||
NUXT_PUBLIC_MOMENTS_MAX_LINE=4
|
||
#recaptchaV3代码中使用此网站密钥
|
||
NUXT_PUBLIC_GOOGLE_RECAPTCHA_SITE_KEY=
|
||
#分页大小
|
||
NUXT_PUBLIC_PAGE_SIZE=10
|
||
|
||
#private
|
||
#recaptchaV3通信密钥
|
||
NUXT_GOOGLE_RECAPTCHA_SECRET_KEY=
|
||
|
||
#是否启用评论通知
|
||
NUXT_PUBLIC_NOTIFY_BY_EMAIL_ENABLE=false
|
||
#管理员邮箱
|
||
NUXT_NOTIFY_MAIL=
|
||
#邮局服务器地址
|
||
NUXT_MAIL_HOST=
|
||
#邮局服务器端口465端口一般是加密的,587端口一般是不加密的
|
||
NUXT_MAIL_PORT=587
|
||
#邮局安全连接true/false
|
||
NUXT_MAIL_SECURE=false
|
||
#邮箱用户名
|
||
NUXT_MAIL_NAME=
|
||
#邮箱密码
|
||
NUXT_MAIL_PASSWORD=
|
||
#邮箱发件人
|
||
NUXT_MAIL_FROM=
|
||
#邮箱发件人名称
|
||
NUXT_MAIL_FROM_NAME=
|
||
|
||
#是否启用阿里云文本审核(只针对评论)
|
||
NUXT_PUBLIC_ALIYUN_TEXT_JUDGE_ENABLE=false
|
||
#阿里云AccessKey ID
|
||
NUXT_ALIYUN_ACCESS_KEY_ID=
|
||
#阿里云AccessKey Secret
|
||
NUXT_ALIYUN_ACCESS_KEY_SECRET=
|
||
|
||
```
|
||
|
||
根据注释内容修改参数
|
||
|
||
如不需要则保持默认即可
|
||
|
||
## 启动容器
|
||
|
||
运行
|
||
|
||
```
|
||
docker-compose up -d
|
||
|
||
```
|
||
|
||
## 反向代理
|
||
|
||
反向代理端口 3000 即可
|
||
|
||
## 演示地址
|
||
|
||
[https://wenxs.cn](https://wenxs.cn/)
|
||
|
||
|
||
[1]: https://img.imsun.org/2024/04/27/662cd4cb6e4ee.png#vwid=1702&vhei=978 |