[phabircator]使用docker镜像redpointgames/phabricator搭建phabricator服务器 设置邮箱、创建用户、审批用户

docker hub镜像地址

https://hub.docker.com/r/hachque/phabricator

github项目地址

https://github.com/RedpointGames/phabricator

pull镜像

docker pull redpointgames/phabricator
docker pull mariadb:10.2

编辑docker-compose.yml

version: '2'
services:
  mariadb:
    image: mariadb:10.2
    volumes:
       - /usr/local/phabricator/mysql:/var/lib/mysql
    ports:
      - 3307:3306
    environment:
      MYSQL_ROOT_PASSWORD: AhghaeG5
  phabricator:
    restart: always
    ports:
     - "62443:443"
     - "80:80"
     - "62022:22"
    volumes:
     - /usr/local/phabricator/repos:/repos
     - /usr/local/phabricator/extensions:/srv/phabricator/phabricator/src/extensions
    depends_on:
     - mariadb
    links:
     - mariadb
    environment:
     - MYSQL_HOST=mariadb
     - MYSQL_USER=root
     - MYSQL_PASS=AhghaeG5
     - PHABRICATOR_REPOSITORY_PATH=/repos
     - PHABRICATOR_HOST=myphabricator.com
    image: redpointgames/phabricator

创建数据目录

sudo mkdir -p /usr/local/phabricator/mysql^C
sudo mkdir -p /usr/local/phabricator/repos
sudo mkdir -p /usr/local/phabricator/extensions

启动容器

docker-compose up

修改/etc/hosts,添加

127.0.0.1 myphabricator.com

访问web地址http://myphabricator.com

扫描二维码关注公众号,回复: 9612762 查看本文章

创建管理员账号自动登陆

设置时区

添加Auth Provider:Username/Password

配置auth.email-domains(testmail.com是自己本地搭建的email服务器域名)

配置默认邮件发件地址

在容器内设置cluster.mailers

0d1f6ea363e9:/srv/phabricator/phabricator # ./bin/config set cluster.mailers --stdin < cluster.mailers 
Reading value from stdin...
Set 'cluster.mailers' in local configuration.

其中cluster.mailers内容如下

[{
	"key": "smtp",
	"type": "smtp",
	"options": {
		"host": "127.0.0.1",
		"port": 10025,
		"user": "[email protected]",
		"password": "noreply"
	}
}]

查看配置

0d1f6ea363e9:/srv/phabricator/phabricator # ./bin/config get cluster.mailers
{
  "config": [
    {
      "key": "cluster.mailers",
      "source": "local",
      "value": [
        {
          "key": "smtp",
          "type": "smtp",
          "options": {
            "host": "127.0.0.1",
            "port": 10025,
            "user": "[email protected]",
            "password": "noreply"
          }
        }
      ],
      "status": "set",
      "errorInfo": null
    },
    {
      "key": "cluster.mailers",
      "source": "database",
      "value": null,
      "status": "unset",
      "errorInfo": null
    }
  ]
}

注册一个账号

发送邮件验证链接

验证账号

登陆管理员账号,打开地址http://myphabricator.com/people/query/approval/,点击“大拇指”审批用户

此时新用户登陆成功,设置时区

发布了161 篇原创文章 · 获赞 39 · 访问量 36万+

猜你喜欢

转载自blog.csdn.net/hknaruto/article/details/103475918