Setting up Phabricator

ZFS Layout for jail

zfs create -o compress=lz4 -o atime=off zroot/j/jails/reviews
zfs create -o recordsize=16k -o mountpoint=/j/jails/reviews/var/db/mysql zroot/j/jails/reviews/db
zfs create -o mountpoint=/j/jails/reviews/var/log/mysql zroot/j/jails/reviews/dblogs
zfs create -o mountpoint=/j/jails/reviews/var/phabricator zroot/j/jails/reviews/files

Packages

arcanist-php80
git
nginx
postfix
mysql57-server
php80-ctype
php80-fileinfo
php80-filter
php80-gd
php80-mysqli
php80-opcache
php80-openssl
php80-pcntl
php80-pecl-APCu
php80-pecl-mailparse
php80-posix
php80-zip
py39-pygments
rsync
sudo

Commands

mkdir -p /usr/local/www/phabricator
cd /usr/local/www/phabricator
git clone https://github.com/facebook/arcanist.git arcanist
git clone https://github.com/freebsd/phabricator.git phabricator

cd /usr/local/www/phabricator/phabricator/support/aphlict/server
npm install ws
touch /var/log/aphlict.log
chown daemon-user /var/log/aphlict.log

MySQL Config

/usr/local/etc/my.cnf

# phab requested
ft_min_word_len=3
ft_stopword_file=/usr/local/www/phabricator/phabricator/resources/sql/stopwords.txt
ft_boolean_syntax=' |-><()~*:""&^'
sql_mode=STRICT_ALL_TABLES,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION

#AllanJude
innodb_file_per_table = 1
log_bin = /var/log/mysql/reviews-bin
max_binlog_size = 256M
expire_logs_days = 14
relay_log = /var/log/mysql/relay-bin

#ZFS tuning
skip-innodb_doublewrite
innodb_flush_log_at_trx_commit=2

Phabricator Config

/usr/local/www/phabricator/phabricator/conf/local/local.json

{
  "metamta.reply-handler-domain": "reviews.freebsd.org",
  "policy.allow-public": true,
  "log.ssh.path": "/var/log/phabricator/ssh.log",
  "phd.user": "daemon-user",
  "storage.local-disk.path": "/var/phabricator/large-files",
  "phabricator.base-uri": "https://reviews.freebsd.org/",
  "metamta.default-address": "phabric-noreply@FreeBSD.org",
  "metamta.domain": "FreeBSD.org",
  "recaptcha.private-key": ...,
  "mysql.pass": ...,
  "mysql.user": ...,
  "mysql.host": ...
}

Checklist

clusteradm/phabricator (last edited 2024-01-16T22:47:37+0000 by MuhammadMoinurRahman)