[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

創建管理員賬號自動登陸

設置時區

添加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/,點擊“大拇指”審批用戶

此時新用戶登陸成功,設置時區

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章