mirror of https://github.com/jkjoy/sunpeiwen.git
misskey
This commit is contained in:
parent
6fc8e54af4
commit
1e1427c216
|
@ -6,7 +6,9 @@ abbrlink: 57ea9005
|
||||||
date: 2023-10-03 09:06:40
|
date: 2023-10-03 09:06:40
|
||||||
cover:
|
cover:
|
||||||
---
|
---
|
||||||
|
- 经过测试国内部署会有无法通讯的问题.
|
||||||
|
## 测试环境
|
||||||
|
centos7.9
|
||||||
## 准备工作
|
## 准备工作
|
||||||
- git
|
- git
|
||||||
- openssl
|
- openssl
|
||||||
|
|
|
@ -0,0 +1,98 @@
|
||||||
|
---
|
||||||
|
title: 快速部署misskey实例
|
||||||
|
date: 2023-10-11 16:57:47
|
||||||
|
tags: 部署
|
||||||
|
categories: 分享
|
||||||
|
cover:
|
||||||
|
---
|
||||||
|
## 使用官方推荐一键脚本
|
||||||
|
使用纯净的Ubuntu系统安装,推荐配置双核心四线程.
|
||||||
|
### 更新软件
|
||||||
|
```
|
||||||
|
sudo apt update; sudo apt full-upgrade -y; sudo reboot
|
||||||
|
```
|
||||||
|
### 一键脚本
|
||||||
|
```
|
||||||
|
wget https://raw.githubusercontent.com/joinmisskey/bash-install/main/ubuntu.sh -O ubuntu.sh; sudo bash ubuntu.sh
|
||||||
|
```
|
||||||
|
按照提示输入内容
|
||||||
|
### 更新misskey脚本
|
||||||
|
更新 Misskey 的脚本不会升级运行环境。 对于脚本的更新内容,另请参阅 “更新日志”
|
||||||
|
```
|
||||||
|
wget https://raw.githubusercontent.com/joinmisskey/bash-install/main/update.ubuntu.sh -O update.sh
|
||||||
|
```
|
||||||
|
```
|
||||||
|
sudo bash update.sh
|
||||||
|
```
|
||||||
|
- 使用 systemd 的小伙伴, 添加 -r 可以更新并重启系统。
|
||||||
|
- 使用 docker 的小伙伴, 可以特定软件包版本 repository:tag 来更新。
|
||||||
|
## 使用docker compose部署
|
||||||
|
### 环境
|
||||||
|
- git
|
||||||
|
- docker
|
||||||
|
- nginx
|
||||||
|
### 步骤
|
||||||
|
#### git克隆仓库
|
||||||
|
```
|
||||||
|
cd /opt
|
||||||
|
git clone -b master https://github.com/misskey-dev/misskey.git
|
||||||
|
cd misskey
|
||||||
|
git checkout master
|
||||||
|
```
|
||||||
|
#### 复制配置文件:
|
||||||
|
```
|
||||||
|
cp .config/example.yml .config/default.yml
|
||||||
|
cp .config/docker_example.env .config/docker.env
|
||||||
|
cp docker-compose.yml.example docker-compose.yml
|
||||||
|
```
|
||||||
|
#### 编辑default.yml中
|
||||||
|
|
||||||
|
`url`设置为实例域名
|
||||||
|
db:`host`设置为`db`
|
||||||
|
redis:`host`设置为`redis`
|
||||||
|
#### 构建镜像
|
||||||
|
```
|
||||||
|
docker compose build
|
||||||
|
docker compose run --rm web yarn run init
|
||||||
|
```
|
||||||
|
完成之后
|
||||||
|
#### 启动容器
|
||||||
|
```
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
#### 反向代理
|
||||||
|
参考以下
|
||||||
|
```
|
||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
|
||||||
|
proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=cache1:16m max_size=1g inactive=720m use_temp_path=off;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name misskey.example.com;
|
||||||
|
client_max_body_size 0;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:3000;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_redirect off;
|
||||||
|
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
|
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
|
||||||
|
proxy_cache cache1;
|
||||||
|
proxy_cache_lock on;
|
||||||
|
proxy_cache_use_stale updating;
|
||||||
|
add_header X-Cache $upstream_cache_status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue