How to install phabricator using Docker

How to install phabricator using Docker

I am using the Ubuntu 16.04 system here.

Installation using docker

We use the image provided by https://hub.docker.com/r/redpointgames/phabricator/.

In this image, we have been provided with a variety of plug-ins, but we need to provide a MySQL database address ourselves.

So we can first use docker to install a mysql database. You can refer to: https://www.jb51.net/article/148880.htm

According to the above tutorial, we installed mysql, the account is root, and the password is 123456

pass

docker inspect <container id> |grep IPAddress

We can know the IP address of the mysql container. The private IP address of the container we found is 172.17.0.2.

Next we can use docker to install phabricator.

docker pull redpointgames/phabricator # 拉取最新版的phabricator

start up

docker run --name phabricator -p 443:443 -p 332:22 -p 8891:80 -v /root/phabricator/backup:/repos -e PHABRICATOR_HOST=xxxxxx:8891 -e MYSQL_HOST=172.17.0.2 -e MYSQL_USER=root -e MYSQL_PASS=123456 -e PHABRICATOR_REPOSITORY_PATH=/repos -e PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -it redpointgames/phabricator /bin/bash /app/init.sh

Where xxxx is the external IP address of your server. You can access the phabricator deployed by docker on your server through http://xxxxx:8891. But remember to enable the security group.

After the installation is complete, we can use the external network ip
Add port number 8891 to access it.

At this time, the user we added will be the system administrator by default, and can log in to the background to make other settings. But don't exit this page yet. Because some settings are required.

If this is not your first time visiting this interface, you can also add users through commands in the console.

Enter the container cd /srv/phabricator/phabricator
./bin/accountadmin

If your administrator user logs out, the following message will be displayed

This Phabricator install is not configured with any enabled authentication providers which can be used to log in. If you have accidentally locked yourself out by disabling all providers, you can use phabricator/bin/auth recover <username> to recover access to an administrative account.

You should run the command

Enter the container cd /srv/phabricator/phabricator
./bin/auth recover luanpeng (administrator account created on the web page)

You will be prompted to enter through a web page.

Use this link to recover access to the "luanpeng" account from the web interface:
  http://xxxxxx:8891/login/once/recover/1/xxxxxxxxxx/
After logging in, you can use the "Auth" application to add or restore authentication providers and allow normal logins to succeed.

Follow the prompts

Select Auth in the left column of the homepage and enter the following figure

Allow users to log in and register

So far, phabricator has been installed.

If you don't want to use Docker installation, you can deploy it independently. However, the steps are rather complicated, so it is recommended to deploy through docker.

Install using the installation script

Create an installation script. Open the URL and copy the script content in the webpage to the newly created sh file, https://secure.phabricator.com/source/phabricator/browse/master/scripts/install/install_ubuntu.sh

Download the script file from the URL, or directly create a sh file locally and copy the sh code on the web page. Create a local installation script install_ubuntu.sh

Create the installation directory /home/luanpeng/work/phabricator

Copy the installation script to the installation directory and execute the script

sh install_ubuntu.sh

Execute the installation script and follow the on-screen instructions. The script will automatically install a series of tools for you, including git, apache, mysql, php, etc.

Note: When installing MySQL, you will be prompted several times to enter the root password. It is recommended to set the password to empty for easy use later.

Download Phabricator and its dependencies

$ cd somewhere/ # pick some install directory Switch to the installation directory somewhere/ $ git clone git://github.com/facebook/libphutil.git
somewhere/ $ git clone git://github.com/facebook/arcanist.git
somewhere/ $ git clone git://github.com/facebook/phabricator.git

WEB server: Configure Apache

Add sverver name
(1) Modify httpd.conf. This file should be empty when Apache is just installed. (For 2.4.x version, just create the httpd.conf file in the /etc/apache2 path)
Add the following content: ServerName localhost
(2) Save and exit.
2. Verify Apache installation (1) Restart the Apache service
/etc/init.d/apache2 restart
(2) Verify the page. Open the browser and enter localhost in the address bar. Check to see if the words "It works" appear. If so, Apache is running normally. Otherwise, you need to check whether httpd.conf is configured correctly.

Update Phabricator

Since Phabricator is under constant development, you should update it frequently. How to Update:

  • Stop the webserver
  • Run git to pull libphutil/, arcanist/, phabricator
  • Run phabricator/bin/storage upgrade
  • Restart the webserver

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • How to install common components (mysql, redis) in Docker
  • 6 solutions for network failure in Docker container
  • Example of using Docker Swarm to build a distributed crawler cluster
  • Example of how to create and run multiple MySQL containers in Docker
  • A brief analysis of Docker private image library and Alibaba Cloud object storage OSS
  • Example of how to build a Mysql cluster with docker
  • A brief discussion on docker-compose network settings
  • Solve the problem of docker pull being reset
  • Solution to the problem of slow docker pull image speed
  • Solution to the problem that docker nginx cannot be accessed after running
  • Detailed explanation of how to cleanly uninstall Docker

<<:  JavaScript to achieve fixed sidebar

>>:  JavaScript countdown to close ads

Recommend

Vue3 (III) Website Homepage Layout Development

Table of contents 1. Introduction 2. Actual Cases...

Several commonly used single-page application website sharing

CSS3Please Take a look at this website yourself, ...

How to deploy and start redis in docker

Deploy redis in docker First install Docker in Li...

MySQL 8.0 WITH query details

Table of contents Learning about WITH queries in ...

XHTML tags that are easily confused by the location of the use

<br />We have always emphasized semantics in...

MySQL 5.6 compressed package installation method

There are two installation methods for MySQL: msi...

JavaScript Shorthand Tips

Table of contents 1. Merge arrays 2. Merge arrays...

An in-depth summary of MySQL time setting considerations

Does time really exist? Some people believe that ...

Mysql varchar type sum example operation

Some friends, when learning about databases, acci...

Why MySQL does not recommend deleting data

Table of contents Preface InnoDB storage architec...

Sample code for CSS dynamic loading bar effect

Using the knowledge of CSS variables, I will dire...

MySQL master-slave replication delay causes and solutions

Table of contents A brief overview of the replica...

How to use Docker to package and deploy images locally

First time using docker to package and deploy ima...