Files

55 lines
2.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Misskey — 开源社交平台
> 部署于 2026-08-04,运行中 🟢
## 简介
[misskey-dev/misskey](https://github.com/misskey-dev/misskey):日系开源社交平台(类微博/推特),界面颜值天花板,支持联邦宇宙(ActivityPub)。玩法丰富:笔记(嘟文)、反应表情、画板、主题帖等。
## 技术栈
- 后端:Node.js(NestJS)+ TypeScript
- 数据库:PostgreSQL(默认)/ 其他可选
- 缓存/队列:Redis
- 搜索:SQL Like(默认)/ Meilisearch 可选
## 部署记录(Docker Compose)
服务组成:`misskey/misskey:latest` + `postgres:18-alpine` + `redis:7-alpine`
```yaml
services:
web:
image: misskey/misskey:latest
ports: ["3000:3000"]
volumes: ["./files:/misskey/files", "./.config:/misskey/.config:ro"]
depends_on: { db: {condition: service_healthy}, redis: {condition: service_healthy} }
db:
image: postgres:18-alpine
env_file: .config/docker.env # POSTGRES_USER/PASSWORD/DB
redis:
image: redis:7-alpine
networks:
internal_network: { internal: true } # db/redis 只走内网
external_network: {}
```
关键配置:`.config/default.yml`(复制自 `docker_example.yml`)中 `url` 必须设为对外访问地址,**启动后不可更改**;首次启动自动跑数据库迁移。
## 🕳️ 踩坑记录
1. **数据库认证失败(auth_failed)**:官方 `docker_example.yml` 里 db 账号是占位符 `example-misskey-user/example-misskey-pass`,复制后忘记改,与 docker.env 里生成的随机账号不一致,web 启动时 PG 认证失败。修复:把 `default.yml` 的 `db.user/pass` 改成与 `docker.env` 一致,`docker compose restart web`
2. **首启动迁移耗时**:web 容器启动要跑 `pnpm migrate && pnpm start`,健康检查从 starting 到 healthy 需要约 1 分钟,别急着判失败
## 备注
- 端口策略:3000 对外,PostgreSQL/Redis 全走 `internal_network`,外部不可达
- 第一个注册的账号自动成为管理员,后台可管理站点
- 若只想自己玩,可关闭开放注册或改邀请制
- 数据在 `/tmp/misskey/`(files/、db/、redis/、.config/),容器删了数据还在
## 清理记录
- **2026-08-04 17:22** 体验完毕,按 xf 要求删除:3 容器 + 3 镜像(misskey:latest 2.5G / postgres:18-alpine / redis:7-alpine)+ 数据目录 /tmp/misskey,共释放约 3G 磁盘