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

Detailed explanation of the practical use of HTML table layout

When is the table used? Nowadays, tables are gene...

Typescript+react to achieve simple drag and drop effects on mobile and PC

This article shares the specific code of typescri...

Usage and execution process of http module in node

What is the role of http in node The responsibili...

Interviewer asked how to achieve a fixed aspect ratio in CSS

You may not have had any relevant needs for this ...

Vue3.0 implements the magnifying glass effect case study

The effect to be achieved is: fixed zoom in twice...

MySQL learning database search statement DQL Xiaobai chapter

Table of contents 1. Simple retrieval of data 2. ...

Detailed steps for debugging VUE projects in IDEA

To debug js code, you need to write debugger in t...

Zabbix redis automatic port discovery script returns json format

When we perform automatic discovery, there is alw...

Detailed explanation of psql database backup and recovery in docker

1. Postgres database backup in Docker Order: dock...

Analysis of pitfalls in rounding operation of ROUND function in MySQL

This article uses examples to illustrate the pitf...

jenkins+gitlab+nginx deployment of front-end application

Table of contents Related dependency installation...

Implementation of 2D and 3D transformation in CSS3

CSS3 implements 2D plane transformation and visua...

Detailed examples of converting rows to columns and columns to rows in MySQL

mysql row to column, column to row The sentence i...

Vue.js framework implements shopping cart function

This article shares the specific code of Vue.js f...