Wekan安装与使用记录-Docker

免费开源看板软件Wekan

本文记录在部署和使用Wekan(作为个人看板)中遇到的一些问题和解决的方法。一来,方便以后笔者本人再次部署或者遇到同样的问题;再者,可以给打算使用Wekan但是又不知从何起手的人做一个参考。如果你的英文足够好,还是建议参考Wekan的文档

本文将讲述如何将Wekan部署到服务器上,如果你想部署到树莓派上可以参考另一篇文章:将免费开源看板软件Wekan部署到树莓派4B

本文将结合笔者在实际使用中的经验介绍:

  • Wekan的安装部署(Docker)
  • Wekan模板的使用
  • Wekan规则的使用

Wekan 是啥?

Wekan在GitHub上的介绍:

Wekan is an completely Open Source and Free software collaborative kanban board application with MIT license.

Whether you’re maintaining a personal todo list, planning your holidays with some friends, or working in a team on your next revolutionary idea, Kanban boards are an unbeatable tool to keep your things organized. They give you a visual overview of the current state of your project, and make you productive by allowing you to focus on the few items that matter the most.

Since Wekan is a free software, you don’t have to trust us with your data and can install Wekan on your own computer or server. In fact we encourage you to do that by providing one-click installationde on various platforms.

简单地说,Wekan是一款遵循MIT协议完全开源的协作看板软件。它支持基于卡片的任务和待办事项管理,同时还允许多用户协同使用。你可以自由地将Wekan部署到你自己的计算机或者服务器(也可以部署在树莓派上哦~)然后使用它。官方Demo:链接。支持的平台:链接。Wekan的功能特性:链接

安装&初始化

Docker (无自动更新)

Keep backups, Docker is more complex than others above. Use only if you have time to test new release first, and it's critical nothing gets broken. Because Docker does not have automatic updates, please keep behind firewall, without any ports open to Internet, because Wekan gets new security etc updates to Node.js and other dependencies often.

根据官方的提示,「仅在能经常测试新版的情况下使用」,因为「Docker没有自动更新」,而Wekan依赖的库可能经常需要安全更新。笔者目前是使用Docker来部署的,一开始用docker安装是觉得用docker部署只用改改配置文件,现在看来更麻烦,估计很快就会转移到snap。接下来,就来讲讲如何用Docker来部署Wekan吧。Wekan的Docker版安装文档:链接

安装环境

  • OS: Ubuntu 18.04 bionic

  • Kernel: x86_64 Linux 4.15.0-99-generic

安装docker

略...

下载docker-compose.yml

如果你没有wget,先安装wget:

sudo apt update
sudo apt install wget

接下来,用wget下载配置文件:

wget https://raw.githubusercontent.com/wekan/wekan/master/docker-compose.yml

修改docker-compose.yml

其实在docker-compose.yml里,对于每个对应的设置都有很想详尽的描述.

这里提一下几个重要的配置:

  • ports

    ports:
          # Docker outsideport:insideport. Do not add anything extra here.
          # For example, if you want to have wekan on port 3001,
          # use 3001:8080 . Do not add any extra address etc here, that way it does not work.
          # remove port mapping if you use nginx reverse proxy, port 8080 is already exposed to wekan-tier network
          - 80:8080

    冒号前为外部端口,冒号后为内部端口,如果你想改变端口号,比如3001,那么只需要改成3001:8080即可

  • root_url

        environment:
          - MONGO_URL=mongodb://wekandb:27017/wekan
          #---------------------------------------------------------------
          # ==== ROOT_URL SETTING ====
          # Change ROOT_URL to your real Wekan URL, for example:
          # If you have Caddy/Nginx/Apache providing SSL
          #  - https://example.com
          #  - https://boards.example.com
          # This can be problematic with avatars https://github.com/wekan/wekan/issues/1776
          #  - https://example.com/wekan
          # If without https, can be only wekan node, no need for Caddy/Nginx/Apache if you don't need them
          #  - http://example.com
          #  - http://boards.example.com
          #  - http://192.168.1.100    <=== using at local LAN
          - ROOT_URL=http://localhost  #   <=== using only at same laptop/desktop where Wekan is installed

    如果只在本地使用那么就不用更改,ROOT_URL=http://localhost.例如使用默认设置,那么使用http://localhost就能访问Wekan。如果像上面的例子将端口改为了3001,那么就需要设置ROOT_URL=http://localhost:3001。如用要在外部访问或者通过域名访问,也是如此,以此类推。参考:链接

  • 关于邮箱系统

    参考:链接

    由于笔者是将Wekan做个人看版使用,所以不需要邮箱系统。在配置文件中删掉或者注释掉MAIL_URLMAIL_FROM即可。

运行

docker-compose.yml所在的目录下:

  • 前台运行

     docker-compose up		#启动
     docker-compose stop	#停止
  • 后台运行(无输出)

    docker-compose up -d	#启动 下面两行为启动成功的提示
    Starting wekan-db ... done
    Recreating wekan-app ... done
    docker-compose stop		#停止

    启动完成后,用浏览器访问对应的网址即可。第一个注册的账号为管理员账号。可在“点击头像”-“选择挂管理面板”打开管理面板对Wekan进行设置。如果只做个人使用,建议勾选禁止自主注册