开源项目管理工具Plane

本文软件由网友 不长到一百四誓不改名 推荐,不过这次是在他推荐之前,就已经完成了的 🙂

什么是 Plane ?

Plane 是一个简单的、可扩展的、开源的项目和产品管理工具。它允许用户从一个基本的任务跟踪工具开始,逐步采用各种项目管理框架,如 AgileWaterfall 等。

命令行安装

在群晖上以 Docker 方式安装。

老苏折腾时,latest 对应 0.7

新建安装目录

1
2
3
4
5
# 新建文件夹 plane 和 子目录
mkdir -p /volume1/docker/plane/{pgdata,redisdata,uploads}

# 进入 plane 目录
cd /volume1/docker/plane

env.txt

官方的提供了 .env.example 文件,地址在:https://github.com/makeplane/plane/blob/develop/.env.example,你可以在本地复制粘贴生成后,上传到 plane 目录,也可以直接用下面的命令下载

1
2
3
4
5
# 下载 env.txt
wget -O env.txt https://raw.githubusercontent.com/makeplane/plane/develop/.env.example

# 下不动的话可以加个代理
wget -O env.txt https://ghproxy.com/raw.githubusercontent.com/makeplane/plane/develop/.env.example

虽然参数很多,但是要跑起来,需要修改的并不多,原本的内容老苏只填了 email 部分,因为要通过邮件邀请团队成员

1
2
3
4
5
6
# Email Settings
EMAIL_HOST=smtp.88.com
EMAIL_HOST_USER=wbsu2003@88.com
EMAIL_HOST_PASSWORD=<第三方邮件客户端密码>
EMAIL_PORT=25
EMAIL_FROM="laosu <wbsu2003@88.com>"

其他的部分未做修改,但是要跑起来,还需要在文件的最后面加上 3 行内容

1
2
3
4
# Auto generated and Required that will be generated from setup.sh
NEXT_PUBLIC_API_BASE_URL=https://plane.laosu.ml:444
WEB_URL=https://plane.laosu.ml:444
SECRET_KEY=IVBfieeGdbKOIXC1a+Pqb989ju41Swyv6sxNUZLv6ZA=
  • SECRET_KEY:可以用命令 openssl rand -base64 32 来生成;

  • NEXT_PUBLIC_API_BASE_URL:后端 API 的地址;
  • WEB_URL:前端网页地址;

以上两个地址,老苏曾经尝试过用局域网 IP + 端口,但在登录时会显示 404 错误,实际地址变成了 http://192.168.0.197:3639/api/api/users/me/, 显然应该是多了一层 api,不确定是不是 bug,用域名或者干脆留空的话,是可以正常登录的

1
2
3
# Default Creds
DEFAULT_EMAIL="captain@plane.so"
DEFAULT_PASSWORD="password123"

设置的是缺省的用户和密码,你可以改出你自己的

nginx.conf

将下面的内容保存为 nginx.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
upstream plane {
server plane-nginx:80;
}

error_log /var/log/nginx/error.log;

server {
listen 80;
root /www/data/;
access_log /var/log/nginx/access.log;
location / {
proxy_pass http://plane-web:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}

location /api/ {
proxy_pass http://plane-api:8000/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}

location /uploads/ {
proxy_pass http://plane-minio:9000/uploads/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

docker-compose.yml

官方的示例:https://github.com/makeplane/plane/blob/develop/docker-compose-hub.yml

你可以下载下来自己修改

1
2
3
4
5
# 下载 docker-compose.yml
wget -O docker-compose.yml https://raw.githubusercontent.com/makeplane/plane/develop/docker-compose-hub.yml

# 下不动的话可以加个代理
wget -O docker-compose.yml https://ghproxy.com/raw.githubusercontent.com/makeplane/plane/develop/docker-compose-hub.yml

也可以直接将下面老苏修改后的内容保存为 docker-compose.yml 文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
version: "3.8"

services:
plane-web:
container_name: plane-frontend
image: makeplane/plane-frontend:latest
restart: always
command: /usr/local/bin/start.sh
environment:
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL}
NEXT_PUBLIC_GOOGLE_CLIENTID: 0
NEXT_PUBLIC_GITHUB_APP_NAME: 0
NEXT_PUBLIC_GITHUB_ID: 0
NEXT_PUBLIC_SENTRY_DSN: 0
NEXT_PUBLIC_ENABLE_OAUTH: 0
NEXT_PUBLIC_ENABLE_SENTRY: 0
#ports:
# - 3636:3000

plane-api:
container_name: plane-backend
image: makeplane/plane-backend:latest
restart: always
command: ./bin/takeoff
environment:
DJANGO_SETTINGS_MODULE: plane.settings.production
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
REDIS_URL: redis://plane-redis:6379/
EMAIL_HOST: ${EMAIL_HOST}
EMAIL_HOST_USER: ${EMAIL_HOST_USER}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
EMAIL_PORT: ${EMAIL_PORT}
EMAIL_FROM: ${EMAIL_FROM}
AWS_REGION: ${AWS_REGION}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT}
WEB_URL: ${WEB_URL}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
DISABLE_COLLECTSTATIC: 1
DOCKERIZED: 1
OPENAI_API_KEY: ${OPENAI_API_KEY}
GPT_ENGINE: ${GPT_ENGINE}
SECRET_KEY: ${SECRET_KEY}
DEFAULT_EMAIL: ${DEFAULT_EMAIL}
DEFAULT_PASSWORD: ${DEFAULT_PASSWORD}
USE_MINIO: 1
depends_on:
- plane-db
- plane-redis
#ports:
# - 3637:8000

plane-worker:
container_name: plane-worker
image: makeplane/plane-worker:latest
restart: always
command: ./bin/worker
environment:
DJANGO_SETTINGS_MODULE: plane.settings.production
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
REDIS_URL: redis://plane-redis:6379/
EMAIL_HOST: ${EMAIL_HOST}
EMAIL_HOST_USER: ${EMAIL_HOST_USER}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
EMAIL_PORT: ${EMAIL_PORT}
EMAIL_FROM: ${EMAIL_FROM}
AWS_REGION: ${AWS_REGION}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT}
WEB_URL: ${WEB_URL}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
DISABLE_COLLECTSTATIC: 1
DOCKERIZED: 1
OPENAI_API_KEY: ${OPENAI_API_KEY}
GPT_ENGINE: ${GPT_ENGINE}
SECRET_KEY: ${SECRET_KEY}
DEFAULT_EMAIL: ${DEFAULT_EMAIL}
DEFAULT_PASSWORD: ${DEFAULT_PASSWORD}
USE_MINIO: 1
depends_on:
- plane-api
- plane-db
- plane-redis

plane-db:
container_name: plane-db
image: postgres:14
restart: always
command: postgres -c 'max_connections=1000'
environment:
POSTGRES_USER: ${PGUSER}
POSTGRES_DB: ${PGDATABASE}
POSTGRES_PASSWORD: ${PGPASSWORD}
volumes:
- ./pgdata:/var/lib/postgresql/data

plane-redis:
container_name: plane-redis
image: redis:6.2
restart: always
volumes:
- ./redisdata:/data

plane-minio:
container_name: plane-minio
image: minio/minio
volumes:
- ./uploads:/export
environment:
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
command: server /export --console-address ":9090"
#ports:
# - 3638:9000

createbuckets:
image: minio/mc
depends_on:
- plane-minio
entrypoint: >
/bin/sh -c " /usr/bin/mc config host add plane-minio http://plane-minio:9000 \$AWS_ACCESS_KEY_ID \$AWS_SECRET_ACCESS_KEY; /usr/bin/mc mb plane-minio/\$AWS_S3_BUCKET_NAME; /usr/bin/mc anonymous set download plane-minio/\$AWS_S3_BUCKET_NAME; exit 0; "

plane-nginx:
container_name: plane-nginx
image: nginx
ports:
- 3639:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- plane-web
- plane-api

然后执行下面的命令

1
2
3
4
5
6
7
8
9
10
# 新建文件夹 plane 和 子目录
mkdir -p /volume1/docker/plane/{pgdata,redisdata,uploads}

# 进入 plane 目录
cd /volume1/docker/plane

# 将 docker-compose.yml、env.txt、nginx.conf 放入当前目录

# 一键运行
docker-compose --env-file env.txt up -d

如果没意外的话,除了 plane_createbuckets_1 外,另外 7 个容器应该都是正常启动的

老苏将用到的 env.txtconfig.conf docker-compose.yml 文件放到了 https://github.com/wbsu2003/synology/tree/main/Plane,方便大家对比着看

运行

在浏览器中输入 https://plane.laosu.ml:444 就能看到登录界面

默认用户:captain@plane.so,密码为:password123

需要设置角色

创建工作区

邀请成员

输入要邀请的人员

可以一次输入多个邮件地址

接下来的提示界面看看就可以了

完成后就可以看到 Dashboard 界面了

团队成员

如果邮件设置没问题,受邀请的成员很快会收到邮件

但是实际上地址存在问题,获取的地址是 http:///workspace-member-invitation/1a927b8e-ed1b-4f16-8383-07eee3cf1392?email=wbsu2003@hotmail.com

需要自行添加域名后变成 https://plane.laosu.ml:444/workspace-member-invitation/1a927b8e-ed1b-4f16-8383-07eee3cf1392?email=wbsu2003@hotmail.com

可以选择接受或者忽略

尚未接受邀请的成员会有 Pending 标志

接下来就可以开始建项目( Create Project),功能就留给需要的人自己摸索吧

遗留问题

  1. 就是上面提到的邮件的邀请链接问题;
  2. 上传图片没解决;

不知道是设置问题还是软件本身的 bug

参考文档

makeplane/plane: Plane helps you track your issues, epics, and product roadmaps in the simplest way possible.
地址:https://github.com/makeplane/plane

Plane - The open source project management tool
地址:https://plane.so/

Plane Documentation
地址:https://docs.plane.so/

Plane - Open-source project planning tool to streamline issues, sprints, and product roadmaps. (W.I.P., Linear/JIRA Alternative) - New release update v0.2-dev 🚀 🍰 : selfhosted
地址:https://www.reddit.com/r/selfhosted/comments/10q7h1z/plane_opensource_project_planning_tool_to/