Giter VIP home page Giter VIP logo

phabricator's People

Contributors

adamgoose avatar cguenthertuchemnitz avatar deltasquare4 avatar gomlgs avatar hach-que avatar huangjimmy avatar justinjoy avatar ka7 avatar mattsta avatar michelkaeser avatar neomantra avatar robwiss avatar sheershoff avatar tinkernels avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phabricator's Issues

Waiting for /run/sshd.pid to appear...

On my Vagrant box when I run something like

docker run -p 2222:22 -p 22280:22280 -p 80:80 -p 443:443 -v /vagrant/dockers/hach-que-docker-phabricator/config:/config -v /tmp/repo/storage:/srv/repo --name=phabricator hachque/phabricator

After some time, every second or so there is a message

Waiting for /run/sshd.pid to appear...
Waiting for /run/sshd.pid to appear...
Waiting for /run/sshd.pid to appear...
Waiting for /run/sshd.pid to appear...
Waiting for /run/sshd.pid to appear...
Waiting for /run/sshd.pid to appear...

Any idea what is causing this? Can I ignore this?

Does the script assume there is no ssh on host?

incomplete SSL_TYPE external configuration

Hi there,

i am using a nginx ssl terminating reverse proxy. The basic setup runs fine with the SSL_TYPE external configuration. But one point is missing. The client browser does not know that he should connect with https websocket connection to the notification server. The last missing point was the

<?php

$_SERVER['HTTPS'] = true;

in the /srv/phabricator/phabricator/support/preamble.php

After that, the notifications run fine in combination with the ssl terminating nginx reverse proxy following the official configuration guide:
https://secure.phabricator.com/book/phabricator/article/notifications/

Or like described in my bug report:
https://secure.phabricator.com/T11103

Mapping Phabricator port 80 to an external port of a different value like 8088 breaks on redirection to auth page.

I got an issue which looks to be a redirection issue. Since I mapped the internal port 80 to the external port 8088, I got a 'page not found' with a URL of 'http://phabricator.somecompany.com/auth/register/'.
When I remapped port 80 to 80, it worked, and I got Phabricator's admin setup page as expected.

Phab is located at 'phabricator.somecompany.com:8088', but the response to the root URI & '/index.php' is 'page not found' and an auth page at port 80.

Thanks in advance for your prompt reply.

How to forward SSH

I can't expose port 22 (sshd conflicts) so how can I redirect a certain ssh user to the phabricator container?

crash on startup

The current version seem to crash on startup with the following output:

+ sudo -u git ./bin/config set storage.default-namespace phabricator
[2016-05-04 21:53:20] EXCEPTION: (FilesystemException) Requested path '/srv/phabricator/phabricator/conf/local/local.json' is not writable. at [<phutil>/src/filesystem/Filesystem.php:1081]
arcanist(head=master, ref.master=c58f1b9a2507), phabricator(head=master, ref.master=d85386488bf5), phutil(head=master, ref.master=0709cd5cfc26)
  #0 Filesystem::assertWritable(string) called at [<phutil>/src/filesystem/Filesystem.php:69]
  #1 Filesystem::assertWritableFile(string) called at [<phutil>/src/filesystem/Filesystem.php:89]
  #2 Filesystem::writeFile(string, string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigLocalSource.php:41]
  #3 PhabricatorConfigLocalSource::saveConfig() called at [<phabricator>/src/infrastructure/env/PhabricatorConfigLocalSource.php:12]
  #4 PhabricatorConfigLocalSource::setKeys(array) called at [<phabricator>/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:165]
  #5 PhabricatorConfigManagementSetWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:410]
  #6 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:303]
  #7 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/setup/manage_config.php:21]
[ FAILED ] /etc/init.simple/10-boot-conf

The file /srv/phabricator/phabricator/conf/local/local.json exists, but is not writable. When i change it to 755 access right, than it runs fine. But i don't want to because it is insecure. It seems to me that the file is owned by the wrong user, because it is owned by root.

My statement, used to run the container is:
docker run --link mariadb101-phabricator:sqlDB --volume /docker/phabricator/config:/config hachque/phabricator:latest

Missing diffusion.ssh-user

Your script does not set configurations for diffusion.ssh-user and all repo URL are wrong. I get
git clone ssh://{IP/DOMAIN}/diffusion/1/testrepo.git and when I run this command I get:

Cloning into 'testrepo'...
Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Correct URL is: git clone ssh://git@{IP/DOMAIN}/diffusion/1/testrepo.git

You should add to 10-boot-conf script:
sudo -u "$PHABRICATOR_VCS_USER" ./bin/config set diffusion.ssh-user "$PHABRICATOR_VCS_USER"

Docker images in new location not updated?

Hi guys,

I followed your instructions on the docker hub:

This repository has been recently moved to RedpointGames/phabricator and the Docker image to use is now redpointgames/phabricator. hachque/phabricator will be kept in sync with redpointgames/phabricator for the foreseeable future, so you don't need to update your configuration immediately.

and used the redpointgames/phabricator image, however unlike the hachque/phabricator image (latest
603 MB 41 minutes ago) the new one doesn't seem to receive any updates (latest 601 MB a month ago)?

NB: The new github repo headline also still points to the supposedly outdated image in the docker hub.

MySQL error despite using PHABRICATOR_STORAGE_TYPE=disk

When I run

docker run -p 8080:80 -p 8043:443 -p 8022:22 \
    -e PHABRICATOR_HOST=my.host \
    -e PHABRICATOR_STORAGE_TYPE=disk \
    -e PHABRICATOR_STORAGE_PATH=//files -v phabricator-storage://files \
    -e PHABRICATOR_REPOSITORY_PATH=//repos -v phabricator-repos://repos \
    --rm --name phabricator redpointgames/phabricator

I still get an error about a lack of MySQL:

mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2 "No such file or directory") when trying to connect
+ /srv/phabricator/phabricator/bin/storage upgrade --force
MySQL Credentials Not Configured

Unable to connect to MySQL using the configured credentials. You must
configure standard credentials before you can upgrade storage. Run these
commands to set up credentials:

  phabricator/ $ ./bin/config set mysql.host __host__
  phabricator/ $ ./bin/config set mysql.user __username__
  phabricator/ $ ./bin/config set mysql.pass __password__

These standard credentials are separate from any administrative credentials
provided to this command with __--user__ or __--password__, and must be
configured correctly before you can proceed.

So either I misunderstood BASIC-CONFIG or this is a bug...

Subversion / hg installation is required

Phabricator supports Git / Subversion / Mercurial, but the image only has Git installed.
I think we should install others as well, like

RUN zypper --on-interactive subversion mercurial

No git-http-backend

Serving git via http seems to be not working at the moment because git-http-backend is not symlinked in phabricator/support/bin. I could pull a PR on this after some time...

Letsencrypt for both PHABRICATOR_HOST and PHABRICATOR_CDN

As far as I understand, I can point the PHABRICATOR_CDN to another domain that points to the same machine to serve files from another domain but from this machine and this should do the security trick since we're not authorized on the alternate domain.

I'm using letsencrypt way. And the certificates do not not work. I've checked the 15-https file and tried to improve it, but got stuck on --csr option and DER format.

Is it possible to automate the CDN portion with letsencrypt?

20-postfix: redirecting to systemctl start postfix.service

I started the container by: docker run -p 80:80 -p 443:443 -p 22:22 -p 22280:22280 -v $(pwd)/config:/config -v $(pwd)/repo:/srv/repo --name=phabricator --link mariadb:linked_mariadb hachque/phabricator

It failed at

[ STARTING ] /etc/init.simple/20-postfix
redirecting to systemctl start postfix.service
Failed to get D-Bus connection: No connection to service manager.
[ FAILED ] /etc/init.simple/20-postfix

However, the command "/etc/init.d/postfix start" works if I run bash in container, and run it directly.

If I run /init in bash it gives the same error.

After removing 20-postfix, the images works fine though.

Some default PHP and MySQL config missing

After deploying the application from the default docker-compose.yml, I can see the following warnings:

selection_243

I think it would be awesome if the container came preconfigured with the proper defaults :)

PHPMailer configuration is not persistent

PHPMailer host/user/pass configuration is stored in /srv/phabricator/phabricator/conf/local/local.json (requires CLI usage to set). It is not persistent across container rebuilds. I can't seem to find any docs on how to set email configuration using environment variables.

10-boot-conf startup issue

I've been trying to get phabricator container to run with the mariadb container and It fails with the message (partial output ~ everything up to this point looks good):

[admin@R330SV3069 scripts]# ./phabricator.start.sh
Unable to find image 'hachque/phabricator:latest' locally
latest: Pulling from hachque/phabricator
7d3401a57fe8: Pull complete 
34f658f0bc1a: Pull complete 
6ab9be4fc512: Pull complete 
bfee2df15dde: Pull complete 
9ddc1611b88d: Pull complete 
87e16d7f95e7: Pull complete 
66d1a8b23d48: Pull complete 
Digest: sha256:7a1c1dee530fa48a7d52b1526c584148b645fd13c3a3613036371c1cd9263a9e
Status: Downloaded newer image for hachque/phabricator:latest
[ STARTING ] /etc/init.simple/10-boot-conf
+ '[' -f /baked ']'
+ '[' mariadb '!=' '' ']'
+ MYSQL_HOST_VARIABLE=mariadb_PORT_3306_TCP_ADDR
+ MYSQL_HOST=
+ MYSQL_PORT_VARIABLE=mariadb_PORT_3306_TCP_PORT
+ MYSQL_PORT=
+ unset MYSQL_HOST_VARIABLE
+ unset MYSQL_PORT_VARIABLE
+ '[' '' == '' ']'
+ MYSQL_STORAGE_NAMESPACE=phabricator
+ '[' letsencrypt == '' ']'
+ '[' '' == '' ']'
+ PHABRICATOR_STORAGE_TYPE=mysql
+ '[' '' '!=' '' ']'
+ '[' '' '!=' '' ']'
+ '[' '' '!=' '' ']'
+ '[' '' '!=' '' ']'
+ '[' '' '!=' '' ']'
+ '[' '' '!=' '' ']'
+ '[' -f /config/script.pre ']'
+ '[' -f /config/script.premig ']'
+ '[' -f /config/script.post ']'
+ '[' -f /config/script.phd ']'
+ '[' -f /config/script.letsencrypt ']'
+ '[' -f /config/letsencrypt.config ']'
+ '[' -d /config/keycache ']'
+ cat
+ source /config.saved
++ OVERRIDE_PHABRICATOR_URI=
++ OVERRIDE_PHABRICATOR_BRANCH=
++ OVERRIDE_ARCANIST_URI=
++ OVERRIDE_ARCANIST_BRANCH=
++ OVERRIDE_LIBPHUTIL_URI=
++ OVERRIDE_LIBPHUTIL_BRANCH=
++ PHABRICATOR_HOST=phabricator.etg.tgf.tc.faa.gov
++ PHABRICATOR_CDN=
++ PHABRICATOR_REPOSITORY_PATH=/repos
++ PHABRICATOR_STORAGE_TYPE=mysql
++ PHABRICATOR_STORAGE_PATH=/home/phab/phabricator/files
++ PHABRICATOR_STORAGE_BUCKET=
++ PHABRICATOR_HOST_KEYS_PATH=/home/phab/phabricator/keys
++ AWS_S3_ACCESS_KEY=
++ AWS_S3_SECRET_KEY=
++ MYSQL_HOST=
++ MYSQL_PORT=
++ MYSQL_USER=root
++ MYSQL_PASS=linux
++ MYSQL_STORAGE_NAMESPACE=phabricator
++ ENABLE_APCU=
++ ENABLE_UPDATE_ON_START=
++ SSL_TYPE=letsencrypt
++ SSL_CERTIFICATE=
++ SSL_PRIVATE_KEY=
++ SSL_EMAIL=
++ SCRIPT_BEFORE_UPDATE=
++ SCRIPT_BEFORE_MIGRATION=
++ SCRIPT_AFTER_MIGRATION=
++ SCRIPT_AFTER_LETS_ENCRYPT=
++ SCRIPT_BEFORE_DAEMONS=
++ SCRIPT_AFTER_DAEMONS=
+ '[' '' '!=' '' ']'
+ '[' '' == true ']'
+ pushd /srv/phabricator/phabricator
/srv/phabricator/phabricator /
+ '[' '' '!=' '' ']'
+ '[' '' '!=' '' ']'
+ '[' root '!=' '' ']'
+ sudo -u git ./bin/config set mysql.user root
Set 'mysql.user' in local configuration.
+ '[' linux '!=' '' ']'
+ sudo -u git ./bin/config set mysql.pass linux
Set 'mysql.pass' in local configuration.
+ '[' phabricator '!=' '' ']'
+ sudo -u git ./bin/config set storage.default-namespace phabricator
Set 'storage.default-namespace' in local configuration.
+ '[' phabricator.etg.tgf.tc.faa.gov '!=' '' ']'
+ '[' letsencrypt == none ']'
+ sudo -u git ./bin/config set phabricator.base-uri https://phabricator.etg.tgf.tc.faa.gov/
Set 'phabricator.base-uri' in local configuration.
+ '[' '' '!=' '' ']'
+ sudo -u git ./bin/config set phd.user git
Set 'phd.user' in local configuration.
+ sudo -u git ./bin/config set pygments.enabled true
Set 'pygments.enabled' in local configuration.
+ '[' /repos '!=' '' ']'
+ sudo -u git ./bin/config set repository.default-local-path /repos
Set 'repository.default-local-path' in local configuration.
+ '[' mysql == mysql ']'
+ sudo -u git ./bin/config set storage.mysql-engine.max-size 67108864
Set 'storage.mysql-engine.max-size' in local configuration.
+ '[' mysql == disk ']'
+ '[' mysql == s3 ']'
+ '[' '' '!=' '' ']'
+ '[' '' '!=' '' ']'
+ '[' letsencrypt == none ']'
+ APHLICT_PROTOCOL=https
+ APHLICT_PORT=443
+ sudo -u git ./bin/config set notification.servers '[{"type": "client","host": "phabricator.etg.tgf.tc.faa.gov","port": 443,"protocol": "https","path": "/ws/"},{"type": "admin","host": "127.0.0.1","port": 22281,"protocol": "http"}]'
Set 'notification.servers' in local configuration.
+ unset APHLICT_PROTOCOL
+ unset APHLICT_PORT
+ popd
/
+ '[' '' == true ']'
+ '[' '' '!=' '' ']'
+ mysqlcheck --host= --port= --user=root --password=linux --databases phabricator_search
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2 "No such file or directory") when trying to connect
+ true
+ /srv/phabricator/phabricator/bin/storage upgrade --force
MySQL Credentials Not Configured

Unable to connect to MySQL using the configured credentials. You must
configure standard credentials before you can upgrade storage. Run these
commands to set up credentials:

  phabricator/ $ ./bin/config set mysql.host __host__
  phabricator/ $ ./bin/config set mysql.user __username__
  phabricator/ $ ./bin/config set mysql.pass __password__

These standard credentials are separate from any administrative credentials
provided to this command with __--user__ or __--password__, and must be
configured correctly before you can proceed.

Raw MySQL Error: Attempt to connect to root@localhost failed with error
#2002: No such file or directory.
[ FAILED ] /etc/init.simple/10-boot-conf

Here is my config file:

docker run -it \
    --rm -p 80:80 -p 443:443 \
    --env PHABRICATOR_HOST=phabricator.etg.tgf.tc.faa.gov \
    --env PHABRICATOR_REPOSITORY_PATH=/repos \
    --env PHABRICATOR_STORAGE_TYPE=disk \
    --env PHABRICATOR_STORAGE_PATH=/files \
    --env PHABRICATOR_HOST_KEYS_PATH=/keys \
    --env MYSQL_LINKED_CONTAINER=mariadb \
    --env MYSQL_USER=root \
    --env MYSQL_PASS=linux \
    --link mariadb:mysql \
    --env SSL_TYPE=letsencrypt \
    -v /home/phab/phabricator/repos:/repos \
    -v /home/phab/phabricator/files:/files \
    -v /home/phab/phabricator/keys:/keys \
    --name phabricator hachque/phabricator

It should be noted that I had to also remove the -p 22:22 as that was causing in issue stating that port 22 was already in use which I'm assuming is being used by mariadb container.

docker: Error response from daemon: driver failed programming external connectivity on endpoint phabricator (9dff53b551da421c3f419a482d9b29c386b6b92ef4bece9d1b15fec6948b1081): Error starting userland proxy: listen tcp 0.0.0.0:22: bind: address already in use.

docker-composer up error

hi all,

i got a problem.

my docker-composer.yml file,

mariadb:
  restart: always
  image: hachque/mariadb
  volumes:
    - /home/docker/srv/phabricator/mariadb:/var/lib/mysql
phabricator:
  restart: always
  image: hachque/phabricator
  volumes:
    - /home/docker/script/phabricator/config:/config
    - /home/docker/srv/phabricator/repo:/srv/repo
  ports:
    - 22:22
    - 22280:22280
  links:
    - mariadb:linked_mariadb
  environment:
    - VIRTUAL_HOST=phabricator.xxx.com

and the script.pre file,

#!/bin/bash

# Set the name of the host running MySQL:
./bin/config set mysql.host "$LINKED_MARIADB_PORT_3306_TCP_ADDR"

# If MySQL is running on a non-standard port:
./bin/config set mysql.port "$LINKED_MARIADB_PORT_3306_TCP_PORT"

# Set the username for connecting to MySQL:
./bin/config set mysql.user "root"

# Set the password for connecting to MySQL:
./bin/config set mysql.pass ""

# Set the base URI that will be used to access Phabricator:
./bin/config set phabricator.base-uri "https://phabricator.xxx.com/"

when i runing the docker-composer up command,

i got the error log,

phabricator_1 | Raw MySQL Error: Attempt to connect to [email protected] failed with error
phabricator_1 | #1130: Host '172.17.0.4' is not allowed to connect to this MariaDB server.
phabricator_1 | [ FAILED ] /etc/init.simple/10-boot-conf

could tell me what happen?

How to ssh into running container as root user?

Running the container using below command :

/usr/bin/docker run -p 80:80 -p 2222:22 -p 843:843 -p 22280:22280 -v /home/sanket/hachque/config:/config -v /home/sanket/hachque/repo-storage:/srv/repo --name=phabricator --link mariadb:linked_mariadb hachque/phabricator

Unable to bake plugin into new build image

I tried to bake the sprint plugin into the image during docker build. My intention to do this is to keep the plugin and the phabricator version in sync. So that only a rebuild updates the phabricator and the plugin version. I scripted a very small example, based on the advanced configuration wiki section. This example can be found here: https://github.com/cguentherTUChemnitz/docker-phabricator-sprint/tree/plugin_baking

The problem is, that during docker build . the /bake /myScript.sh statement does not succeed. The tail of the generated output is:

+ pushd /srv/phabricator/phabricator
/srv/phabricator/phabricator /
+ '[' '' '!=' '' ']'
+ '[' '' '!=' '' ']'
+ '[' '' '!=' '' ']'
+ '[' '' '!=' '' ']'
+ '[' phabricator '!=' '' ']'
+ sudo -u git ./bin/config set storage.default-namespace phabricator
[2016-05-13 09:26:23] EXCEPTION: (FilesystemException) Requested path '/srv/phabricator/phabricator/conf/local/local.json' is not writable. at [<phutil>/src/filesystem/Filesystem.php:1081]
arcanist(head=master, ref.master=c58f1b9a2507), phabricator(head=master, ref.master=984dff0ae335), phutil(head=master, ref.master=b25e0477b280), sprint(head=master, ref.master=df6e9dee03e4)
  #0 Filesystem::assertWritable(string) called at [<phutil>/src/filesystem/Filesystem.php:69]
  #1 Filesystem::assertWritableFile(string) called at [<phutil>/src/filesystem/Filesystem.php:89]
  #2 Filesystem::writeFile(string, string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigLocalSource.php:41]
  #3 PhabricatorConfigLocalSource::saveConfig() called at [<phabricator>/src/infrastructure/env/PhabricatorConfigLocalSource.php:12]
  #4 PhabricatorConfigLocalSource::setKeys(array) called at [<phabricator>/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:165]
  #5 PhabricatorConfigManagementSetWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:410]
  #6 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:303]
  #7 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/setup/manage_config.php:21]
The command '/bin/sh -c /myScript.sh' returned a non-zero code: 255

/etc/init.simple leftovers in bake

I tried following the instructions for baking configurations but failed due to the following lines in preflight/bake:

for i in /etc/init.simple/*; do
  $i
done

This seems to be left behind in 19d6435.

Deleting Repository

When trying to delete repository in your docker image, it says to use this command:

image

However, when listing the bin directory ls, there's no script with name remove

image

How can I delete the repository?

SVN hosting and missing locales

Hosted SVN repo doesn't work because of missing locales:

$ svn checkout ...
phabricator-ssh-exec: Unexpected output to stderr on exec channel: svnserve: warning: cannot set LC_CTYPE locale
svnserve: warning: environment variable LANG is en_US.UTF-8
svnserve: warning: please check that your locale name is correct

zypper in glibc-locale solves this problem.

Reduce layers of docker image

Each command in the Dockerfile creates a filesystem layer.
The current Dockerfile has too much commands that can be reduced a lot.
For example prevent adding files each by one but put them in a folder and add the whol folder instead.
Also the installation of software should be done in as less steps as possible and cleanup must run in the same command.

Do you agree? Should i prepare a PR?

Unable to establish a connection to any database host

I am getting the following error

[2016-11-23 07:19:51] EXCEPTION: (PhabricatorClusterStrandedException) Unable to establish a connection to any database host (while trying "phabricator_config"). All masters and replicas are completely unreachable. at [/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:140]

Below is the composer part

    phabricator:
        ports:
             - "62443:443"
             - "62080:80"
             - "62022:22"
        volumes:
             - ./data/phabricator/repos:/repos
             - ./data/phabricator/extensions:/srv/phabricator/phabricator/src/extensions
        depends_on:
            - mysql
        links:
            - mysql
        environment:
             - MYSQL_LINKED_CONTAINER=MYSQL
             - MYSQL_USER=maju
             - MYSQL_PASS=1234maju
             - PHABRICATOR_REPOSITORY_PATH=/repos
             - PHABRICATOR_HOST=phab.dev
        image: hachque/phabricator

Can any one help please

do not use sshd in docker container

If i see it right, the ssh port 22 is mapped to 24 to provide ssh access to the container. Using sshd inside docker containers is widely discussed as an antipattern. If you just want to access the containers shell you should access it by ssh to your docker's host and run docker exec -it phabricator_container_name /bin/bash. That will start the /bin/bash shell of your running container instance. Other tasks like backups is more detailed discussed here:
https://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/

best,
Christian

missing path for git-http-backend

The git repository status shows:

Missing Binary git-http-backend Unable to find this binary in the webserver's PATH. You may need to configure environment.append-paths.

The git-http-backend is located in /usr/lib/git.

So please add this path also to the existing search pathes. The following entry in the local.json solves the issue:

"environment.append-paths": [
"/bin",
"/usr/bin",
"/usr/local/bin",
"/usr/lib/git"
],

PHD as git user

In commit #904082c5d7ebf97a8935d1864e7af2b993884848 the phd process is run as the git user. However, I see this in the logs:

[ STARTING ] /etc/init.simple/35-phd
/srv/phabricator/phabricator /
sudo: unable to execute bin/phd: Permission denied

I don't know if that is the real problem, but in my case, the image doesn't work. When I visit the page, I get a 'File not found' message. The access.log from nginx says there's an error in the FastCGI process:

FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, 
client: x.y.z.a, server: , request: "GET /index.php HTTP/1.1", upstream: 
"fastcgi://unix:/tmp/php-fpm-phabricator.sock:", host: "x.y.z.a:49175"

Could these issues be related?

Not able to install with docker

Sorry I am just getting started to learn docker,

I am using docker-compose, I don't know what I am doing wrong, here is my docker file.

version: '2'
services:
  phabricator:
    restart: always
    ports:
     - "62443:443"
     - "62080:80"
     - "62022:22"
    volumes:
     - /srv/docker/phabricator/repos:/repos
     - /srv/docker/phabricator/extensions:/srv/phabricator/phabricator/src/extensions
     - /srv/docker/phabricator/sshkeys:/sshkeys
     - /srv/docker/phabricator/filestore:/filestore
    depends_on:
     - mysql
    links:
     - mysql
    environment:
     - MYSQL_LINKED_CONTAINER=mysql
     - PHABRICATOR_REPOSITORY_PATH=/repos
     - PHABRICATOR_HOST_KEYS_PATH=/sshkeys
     - PHABRICATOR_HOST=myhost
     - SSL_TYPE=letsencrypt
     - SSL_EMAIL='myemail'
     - PHABRICATOR_STORAGE_TYPE=disk
     - PHABRICATOR_STORAGE_PATH=/filestore
    image: hachque/phabricator
  mysql:
    restart: always
    volumes:
     - /srv/docker/phabricator/mysql:/var/lib/mysql
    image: mysql:5.7.14
    environment:
     - MYSQL_RANDOM_ROOT_PASSWORD=yes
     - MYSQL_USER=phabricator
     - MYSQL_PASSWORD=phabricator

Here is the error messages I am getting

ubuntu@phabricator:~/phabricator$ sudo docker-compose up
Creating phabricator_mysql_1
Creating phabricator_phabricator_1
Attaching to phabricator_mysql_1, phabricator_phabricator_1
mysql_1        | Initializing database
phabricator_1  | [ STARTING ] /etc/init.simple/10-boot-conf
phabricator_1  | + '[' -f /baked ']'
phabricator_1  | + '[' mysql '!=' '' ']'
phabricator_1  | + MYSQL_HOST_VARIABLE=mysql_PORT_3306_TCP_ADDR
phabricator_1  | + MYSQL_HOST=
phabricator_1  | + MYSQL_PORT_VARIABLE=mysql_PORT_3306_TCP_PORT
phabricator_1  | + MYSQL_PORT=
phabricator_1  | + unset MYSQL_HOST_VARIABLE
phabricator_1  | + unset MYSQL_PORT_VARIABLE
phabricator_1  | + '[' '' == '' ']'
phabricator_1  | + MYSQL_STORAGE_NAMESPACE=phabricator
phabricator_1  | + '[' letsencrypt == '' ']'
phabricator_1  | + '[' '' == '' ']'
phabricator_1  | + PHABRICATOR_VCS_USER=git
phabricator_1  | + '[' '' == '' ']'
phabricator_1  | + PHABRICATOR_STORAGE_TYPE=mysql
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' -f /config/script.pre ']'
phabricator_1  | + '[' -f /config/script.premig ']'
phabricator_1  | + '[' -f /config/script.post ']'
phabricator_1  | + '[' -f /config/script.phd ']'
phabricator_1  | + '[' -f /config/script.letsencrypt ']'
phabricator_1  | + '[' -f /config/letsencrypt.config ']'
phabricator_1  | + '[' -d /config/keycache ']'
phabricator_1  | + cat
phabricator_1  | + source /config.saved
phabricator_1  | ++ OVERRIDE_PHABRICATOR_URI=
phabricator_1  | ++ OVERRIDE_PHABRICATOR_BRANCH=
phabricator_1  | ++ OVERRIDE_ARCANIST_URI=
phabricator_1  | ++ OVERRIDE_ARCANIST_BRANCH=
phabricator_1  | ++ OVERRIDE_LIBPHUTIL_URI=
phabricator_1  | ++ OVERRIDE_LIBPHUTIL_BRANCH=
phabricator_1  | ++ PHABRICATOR_HOST=example.com
phabricator_1  | ++ PHABRICATOR_CDN=
phabricator_1  | ++ PHABRICATOR_REPOSITORY_PATH=/repos
phabricator_1  | ++ PHABRICATOR_STORAGE_TYPE=mysql
phabricator_1  | ++ PHABRICATOR_STORAGE_PATH=/filestore
phabricator_1  | ++ PHABRICATOR_STORAGE_BUCKET=
phabricator_1  | ++ PHABRICATOR_VCS_USER=git
phabricator_1  | ++ PHABRICATOR_VCS_PORT=
phabricator_1  | ++ PHABRICATOR_HOST_KEYS_PATH=/sshkeys
phabricator_1  | ++ AWS_S3_ACCESS_KEY=
phabricator_1  | ++ AWS_S3_SECRET_KEY=
phabricator_1  | ++ MYSQL_HOST=
phabricator_1  | ++ MYSQL_PORT=
phabricator_1  | ++ MYSQL_USER=
phabricator_1  | ++ MYSQL_PASS=
phabricator_1  | ++ MYSQL_STORAGE_NAMESPACE=phabricator
phabricator_1  | ++ ENABLE_APCU=
phabricator_1  | ++ ENABLE_UPDATE_ON_START=
phabricator_1  | ++ SSL_TYPE=letsencrypt
phabricator_1  | ++ SSL_CERTIFICATE=
phabricator_1  | ++ SSL_PRIVATE_KEY=
phabricator_1  | ++ SSL_EMAIL=''\''myemail'\'''
phabricator_1  | ++ SCRIPT_BEFORE_UPDATE=
phabricator_1  | ++ SCRIPT_BEFORE_MIGRATION=
phabricator_1  | ++ SCRIPT_AFTER_MIGRATION=
phabricator_1  | ++ SCRIPT_AFTER_LETS_ENCRYPT=
phabricator_1  | ++ SCRIPT_BEFORE_DAEMONS=
phabricator_1  | ++ SCRIPT_AFTER_DAEMONS=
phabricator_1  | + sed -i s/PHABRICATOR/git/g /etc/passwd
phabricator_1  | + sed s/__PHABRICATOR_VCS_USER__/git/g /etc/phabricator-ssh/sshd_config.phabricator.template
phabricator_1  | + sed s/__PHABRICATOR_VCS_USER__/git/g /etc/phabricator-ssh/phabricator-ssh-hook.sh.template
phabricator_1  | + sed s/__PHABRICATOR_VCS_USER__/git/g /etc/php5/fpm/php-fpm.conf.template
phabricator_1  | + chmod 755 /etc/phabricator-ssh/phabricator-ssh-hook.sh
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' == true ']'
phabricator_1  | + pushd /srv/phabricator/phabricator
phabricator_1  | /srv/phabricator/phabricator /
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' phabricator '!=' '' ']'
phabricator_1  | + sudo -u git ./bin/config set storage.default-namespace phabricator
phabricator_1  | Set 'storage.default-namespace' in local configuration.
phabricator_1  | + '[' example.com '!=' '' ']'
phabricator_1  | + '[' letsencrypt == none ']'
phabricator_1  | + sudo -u git ./bin/config set phabricator.base-uri example.com
phabricator_1  | Set 'phabricator.base-uri' in local configuration.
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + sudo -u git ./bin/config set phd.user git
phabricator_1  | Set 'phd.user' in local configuration.
phabricator_1  | + sudo -u git ./bin/config set pygments.enabled true
phabricator_1  | Set 'pygments.enabled' in local configuration.
phabricator_1  | + '[' /repos '!=' '' ']'
phabricator_1  | + sudo -u git ./bin/config set repository.default-local-path /repos
phabricator_1  | Set 'repository.default-local-path' in local configuration.
phabricator_1  | + '[' mysql == mysql ']'
phabricator_1  | + sudo -u git ./bin/config set storage.mysql-engine.max-size 67108864
mysql_1        | Database initialized
mysql_1        | MySQL init process in progress...
phabricator_1  | Set 'storage.mysql-engine.max-size' in local configuration.
phabricator_1  | + '[' mysql == disk ']'
phabricator_1  | + '[' mysql == s3 ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + '[' letsencrypt == none ']'
phabricator_1  | + APHLICT_PROTOCOL=https
phabricator_1  | + APHLICT_PORT=443
phabricator_1  | + sudo -u git ./bin/config set notification.servers '[{"type": "client","host": "example.com","port": 443,"protocol": "https","path": "/ws/"},{"type": "admin","host": "127.0.0.1","port": 22281,"protocol": "http"}]'
phabricator_1  | Set 'notification.servers' in local configuration.
phabricator_1  | + unset APHLICT_PROTOCOL
phabricator_1  | + unset APHLICT_PORT
phabricator_1  | + popd
phabricator_1  | /
phabricator_1  | + '[' '' == true ']'
phabricator_1  | + '[' '' '!=' '' ']'
phabricator_1  | + mysqlcheck --host= --port= --user= --password= --databases phabricator_search
phabricator_1  | mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2 "No such file or directory") when trying to connect
phabricator_1  | + true
phabricator_1  | + /srv/phabricator/phabricator/bin/storage upgrade --force
phabricator_1  | MySQL Credentials Not Configured
phabricator_1  |
phabricator_1  | Unable to connect to MySQL using the configured credentials. You must
phabricator_1  | configure standard credentials before you can upgrade storage. Run these
phabricator_1  | commands to set up credentials:
phabricator_1  |
phabricator_1  |   phabricator/ $ ./bin/config set mysql.host __host__
phabricator_1  |   phabricator/ $ ./bin/config set mysql.user __username__
phabricator_1  |   phabricator/ $ ./bin/config set mysql.pass __password__
phabricator_1  |
phabricator_1  | These standard credentials are separate from any administrative credentials
phabricator_1  | provided to this command with __--user__ or __--password__, and must be
phabricator_1  | configured correctly before you can proceed.
phabricator_1  |
phabricator_1  | Raw MySQL Error: Attempt to connect to root@localhost failed with error
phabricator_1  | #2002: No such file or directory.
phabricator_1  | [ FAILED ] /etc/init.simple/10-boot-conf
mysql_1        | Warning: Unable to load '/usr/share/zoneinfo/Factory' as time zone. Skipping it.
mysql_1        | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
mysql_1        | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
mysql_1        | Warning: Unable to load '/usr/share/zoneinfo/posix/Factory' as time zone. Skipping it.
mysql_1        | Warning: Unable to load '/usr/share/zoneinfo/right/Factory' as time zone. Skipping it.
phabricator_phabricator_1 exited with code 1

Clarification: Setup of SSH repository (git) access

Hi there,

the dockerhub container is promoted with:

This is a Docker image which provides a fully configured Phabricator image, including SSH connectivity to repositories, real-time notifications via Web Sockets and all of the other parts that are normally difficult to configure done for you.

Additionally i saw this phabricator configuration guide for repository ssh:
https://secure.phabricator.com/book/phabricator/article/diffusion_hosting/#troubleshooting-ssh

No i am confused which part of the configuration guide is already done in the docker container and which not. Some kind of documentation of the last necessary steps would be helpful. After i added the PHABRICATOR_HOST_KEYS_PATH as a mounted volume, i get the following errors:


[ STARTING ] /etc/init.simple/45-phabricator-ssh
cp: cannot stat '/hostkeys/*': No such file or directory
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
Waiting for /run/sshd-phabricator.pid to appear...

Which keys are expected, how to generate them?

Let's Encrypt doesn't auto renew

My phabricator instance needed to be bounced today because the Let's Encrypt certificate had expired. Is there already a mechanism to auto renew Let's Encrypt certs? If not, what's the best way to add one? I bet that Phabricator already has some kind of cron like service installed, but how to use it?

"gzinflate() is not available; unable to read deflated data!"

It looks like some dependency is missing, I'm trying to wrangle which. I installed this container today and ported my data over from an old phabricator install, but every differential diff flashes the same error:
Screenshot: https://www.dropbox.com/s/vf86m8wq284f5q1/Screenshot%202014-12-08%2021.19.19.png?dl=0

I wrote a quick test to check whether or not gzdecode worked properly:

<?php

echo phpversion().", ";

if (function_exists("gzdecode")) {
  echo "gzdecode OK, ";
} else {
  echo "gzdecode no OK, ";
}

if (extension_loaded('zlib')) {
  echo "zlib extension loaded\n";
} else {
  echo "zlib extension not loaded\n";
}

?>

on my host machine I get: 5.4.33, gzdecode OK, zlib extension loaded
inside the docker image: 5.4.20, gzdecode no OK, zlib extension not loaded

Site not found for Phab but my test PHP file works.

Hi,
I'm new to Phabricator & nginx; however, I believe I have set up everything correctly and am able to successfully test a PHP page w/ mySQL connection running your Docker image. Test file works at 'phabricator.somecompany.com:8088/phptest.php'.

mySQL connection is working for this container as well. What I don't understand is why do I keep getting 'site not found' when I navigate to 'phabricator.somecompany.com:8088'. The following are the logs and configurations that I used. Any help is greatly appreciated.

To build image:
docker build -t hachque/phabricator .

To run image:
./run.sh

Contents of run.sh:

docker run \
    --name=hphab\
    --rm -p 8088:80 -p 443:443 -p 8022:22 \
    --env PHABRICATOR_HOST=somecompany.com \
    --env PHABRICATOR_URI=phabricator.somecompany.com \
    --link phab_test:mysql \
    --env MYSQL_LINKED_CONTAINER=MYSQL \
    --env MYSQL_PORT=3306 \
    --env MYSQL_USER=phab \
    --env MYSQL_PASS='mysqlpassword' \
    --env PHABRICATOR_REPOSITORY_PATH='/repos' \
    -v ${HOME}/myRepos/phab_repo:/repos \
    hachque/phabricator 

Attached log file for container run:
hphab_run.txt

Running containers: phab_test contains mySQL server.

### MacBook-Pro.local:.../~[10:45:22]$ docker ps
CONTAINER ID        IMAGE                 COMMAND                CREATED             STATUS              PORTS                                                                      NAMES
7be8187813a4        hachque/phabricator   "/init"                32 hours ago        Up 32 hours         24/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:8022->22/tcp, 0.0.0.0:8088->80/tcp   hphab
0a2846df95c6        oi/testphab           "/root/cont_init.sh"   12 days ago         Up 12 days          0.0.0.0:3306->3306/tcp, 0.0.0.0:8080->80/tcp                               phab_test

git ssh access freeze

Accessing my git repos with git ssh freezes up the connection. After some time the commands are executed correctly. This is related to the problem that the sshd of the phabricator does an rever dns lookup for the connecting client, but the ip does not own a rdns entry. So the phabricator waits for an dns timeout.

To solve this, the DNS lookup can be deactivated for the sshd. I filed a PR for this:
#60

Support High Availability Cluster of Phabricator Docker containers

I intend to add support for High Availability clustering of Phabricator Docker containers.

This will roughly require adding a:

  • CLUSTER_NODE_TYPE environment variable with options none, web, ssh, aphlict, storage and dbupgrade.
  • Environment variables for either keys or authorization with the cluster instance.
  • CLUSTER_NODE_STORAGE_ID environment variable for storage nodes. This is a unique identifier that identifies this particular storage node in the cluster. The storage identifier should be associated with the repository storage volume attached to the Docker container (i.e. even if you delete the container, if you re-create a new storage node with the repository storage volume attached, you should give it the same storage ID).

Users of the high availability configuration will need to build out the cluster like so:

  • Start a node of type dbupgrade first, which connects to the database and applies the initial migration script. These nodes will automatically shutdown after they finish performing the database migration.
  • Start nodes of type web, which offer a web interface.

At this point, users should have a basically functioning Phabricator system, without any repository storage, SSH access or real-time notifications.

Users can then:

  • Start a node of type storage to start adding repository storage to the cluster.
  • Start a node of type ssh to add external SSH repository access to the cluster.
  • Start a node of type aphlict to gain real-time notifications in the cluster.

Each of these types of nodes should signal in the cluster that they're offering these particular functionalities, so we can tailor information in the cluster (such as the SSH URLs displayed in Diffusion) with the relevant access information.

External mysql not working?

Hi,

I tried to run phabricator with mysql setup on the host, so I used the following options:

    --env MYSQL_HOST=localhost \
    --env MYSQL_USER=phab \
    --env MYSQL_PASS=phab \
    --env MYSQL_PORT=3306 \

But when the start script run, I get the following error:

+ mysqlcheck --host=localhost --port=3306 --user=phab --password=phab --databases phabricator_search
/
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2 "No such file or directory") when trying to connect

I guess this should not happen, right?

Clone from the stable branch of phabricator

When using the ENABLE_UPDATE_ON_START flag it always updates to the latest commit on master branch.
However, it seems the phabricator repo has a stable branch.

I think it could be fair to assume that we want to update to the latest stable branch. Or have additional environment variables.

apcu PHP extension not available

Could you please bake into the image the apcu PHP extension?

From phabricator setup issues screen:

Installing the "APCu" PHP extension will improve performance. This extension is strongly recommended. Without it, Phabricator must rely on a very inefficient disk-based cache.

phab hosted git repos - can't read/write over ssh

After #8 the repos are created. I've added my public key to my phabricator account. But I neither can push to nor pull from it.

sheershoff@sheershoff-v5kbnt:~/projects/robowalker/robowalker$ git clone ssh://phab.mydomain.ru/diffusion/RW/robowalker.git
Cloning into 'robowalker'...
Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I tried setting log.ssh.path to /var/www/phab.ssh.log, but the file doesn't appear inside the instance. Also I tried to find some logs for that inside instance or upstart logs where the output of docker command is gathered, and failed to find anything on this issue. Also tried to set diffusion.ssh-(user|host|port) to (git|phab.mydomain.ru|22) and this didn't help either. Any ideas what should I check?

The command that runs phabricator: /usr/bin/docker run --rm -p 22:22 -p 22280:22280 -p 80:80 -p 443:443 -v /var/www/web/phabricator/phabricator/config:/config -v /var/www/web/phabricator/repo:/var/repo --link mariadb:linked_mariadb --name=phabricator hachque/phabricator

No MYSQL_PASS in logs

Can there be an environment variable option to set +x whenever MYSQL_PASS is referenced in 10-boot-conf? Having MYSQL_PASS in the logs is a security vulnerability. I can do this and submit a pull request if you'd prefer.

(btw, thanks for making this container, it's the best I'm aware of. built-in lets encrypt is great)

mysqli error in log when try to set up docker container with "external" db

Hi,

(DAU question incoming, I'm new to docker)

I have a mysql db running on docker (name: mysql). When I try to start the phabricator container with:
docker run \ --rm -p 80:80 -p 443:443 -p 3306:3306 \ --env PHABRICATOR_HOST=localhost \ --env MYSQL_HOST=mysql \ --env MYSQL_USER=phabricator \ --env MYSQL_PASS=secretpassword \ --link mysql:mysql \ --env PHABRICATOR_REPOSITORY_PATH=/repos \ -v /host/repo/path:/repos \ hachque/phabricator

I receive the following error:

[2016-12-13 11:40:23] ERROR 2: mysqli::set_charset(): invalid object or resource mysqli
at [/srv/phabricator/libphutil/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:81]
arcanist(head=master, ref.master=fad85844314b), phabricator(head=master, ref.master=776a1f3aec35), phutil(head=master, ref.master=5ac2ca121489)
#0 mysqli::set_charset(string) called at [/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:81]
#1 AphrontMySQLiDatabaseConnection::connect() called at [/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:101]
#2 AphrontBaseMySQLDatabaseConnection::establishConnection() called at [/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:124]
#3 AphrontBaseMySQLDatabaseConnection::requireConnection() called at [/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:31]
#4 AphrontBaseMySQLDatabaseConnection::openConnection() called at [/src/infrastructure/cluster/PhabricatorDatabaseRef.php:456]
#5 PhabricatorDatabaseRef::isReachable(AphrontMySQLiDatabaseConnection) called at [/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:85]
#6 PhabricatorLiskDAO::newClusterConnection(string, string, string) called at [/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:66]
#7 PhabricatorLiskDAO::establishLiveConnection(string) called at [/src/infrastructure/storage/lisk/LiskDAO.php:1008]
#8 LiskDAO::establishConnection(string) called at [/src/infrastructure/storage/lisk/LiskDAO.php:516]
#9 LiskDAO::loadRawDataWhere(string, string)
#10 call_user_func_array(array, array) called at [/src/infrastructure/storage/lisk/LiskDAO.php:476]
#11 LiskDAO::loadAllWhere(string, string) called at [/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:19]
#12 PhabricatorConfigDatabaseSource::loadConfig(string) called at [/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7]
#13 PhabricatorConfigDatabaseSource::__construct(string) called at [/src/infrastructure/env/PhabricatorEnv.php:249]
#14 PhabricatorEnv::buildConfigurationSourceStack(boolean) called at [/src/infrastructure/env/PhabricatorEnv.php:95]
#15 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [/src/infrastructure/env/PhabricatorEnv.php:75]
#16 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [/scripts/init/lib.php:22]
#17 init_phabricator_script(array) called at [/scripts/init/init-setup.php:12]
#18 require_once(string) called at [/scripts/setup/manage_config.php:5]
[2016-12-13 11:40:23] ERROR 2: mysqli::escape_string(): invalid object or resource mysqli
at [/srv/phabricator/libphutil/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:15]
arcanist(head=master, ref.master=fad85844314b), phabricator(head=master, ref.master=776a1f3aec35), phutil(head=master, ref.master=5ac2ca121489)
#0 mysqli::escape_string(string) called at [/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:15]
#1 AphrontMySQLiDatabaseConnection::escapeBinaryString(string) called at [/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:11]
#2 AphrontMySQLiDatabaseConnection::escapeUTF8String(string) called at [/src/xsprintf/qsprintf.php:178]
#3 xsprintf_query(AphrontMySQLiDatabaseConnection, string, integer, string, integer) called at [/src/xsprintf/xsprintf.php:70]
#4 xsprintf(string, AphrontMySQLiDatabaseConnection, array) called at [/src/xsprintf/qsprintf.php:64]
#5 qsprintf(AphrontMySQLiDatabaseConnection, string, string, string, string)
#6 call_user_func_array(string, array) called at [/src/xsprintf/queryfx.php:5]
#7 queryfx(AphrontMySQLiDatabaseConnection, string, string, string, string)
#8 call_user_func_array(string, array) called at [/src/xsprintf/queryfx.php:13]
#9 queryfx_all(AphrontMySQLiDatabaseConnection, string, string, string, string)
#10 call_user_func_array(string, array) called at [/src/aphront/storage/connection/AphrontDatabaseConnection.php:52]
#11 AphrontDatabaseConnection::queryData(string, string, string, string)
#12 call_user_func_array(array, array) called at [/src/infrastructure/storage/lisk/LiskDAO.php:535]
#13 LiskDAO::loadRawDataWhere(string, string)
#14 call_user_func_array(array, array) called at [/src/infrastructure/storage/lisk/LiskDAO.php:476]
#15 LiskDAO::loadAllWhere(string, string) called at [/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:19]
#16 PhabricatorConfigDatabaseSource::loadConfig(string) called at [/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7]
#17 PhabricatorConfigDatabaseSource::__construct(string) called at [/src/infrastructure/env/PhabricatorEnv.php:249]
#18 PhabricatorEnv::buildConfigurationSourceStack(boolean) called at [/src/infrastructure/env/PhabricatorEnv.php:95]
#19 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [/src/infrastructure/env/PhabricatorEnv.php:75]
#20 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [/scripts/init/lib.php:22]
#21 init_phabricator_script(array) called at [/scripts/init/init-setup.php:12]
#22 require_once(string) called at [/scripts/setup/manage_config.php:5]
[2016-12-13 11:40:23] EXCEPTION: (AphrontQueryException) #0: at [/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:355]
arcanist(head=master, ref.master=fad85844314b), phabricator(head=master, ref.master=776a1f3aec35), phutil(head=master, ref.master=5ac2ca121489)
#0 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:289]
#1 AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:185]
#2 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [/src/xsprintf/queryfx.php:8]
#3 queryfx(AphrontMySQLiDatabaseConnection, string, string, string, string)
#4 call_user_func_array(string, array) called at [/src/xsprintf/queryfx.php:13]
#5 queryfx_all(AphrontMySQLiDatabaseConnection, string, string, string, string)
#6 call_user_func_array(string, array) called at [/src/aphront/storage/connection/AphrontDatabaseConnection.php:52]
#7 AphrontDatabaseConnection::queryData(string, string, string, string)
#8 call_user_func_array(array, array) called at [/src/infrastructure/storage/lisk/LiskDAO.php:535]
#9 LiskDAO::loadRawDataWhere(string, string)
#10 call_user_func_array(array, array) called at [/src/infrastructure/storage/lisk/LiskDAO.php:476]
#11 LiskDAO::loadAllWhere(string, string) called at [/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:19]
#12 PhabricatorConfigDatabaseSource::loadConfig(string) called at [/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7]
#13 PhabricatorConfigDatabaseSource::__construct(string) called at [/src/infrastructure/env/PhabricatorEnv.php:249]
#14 PhabricatorEnv::buildConfigurationSourceStack(boolean) called at [/src/infrastructure/env/PhabricatorEnv.php:95]
#15 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [/src/infrastructure/env/PhabricatorEnv.php:75]
#16 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [/scripts/init/lib.php:22]
#17 init_phabricator_script(array) called at [/scripts/init/init-setup.php:12]
#18 require_once(string) called at [/scripts/setup/manage_config.php:5]
[ FAILED ] /etc/init.simple/10-boot-conf

crash on startup using disk storage path

The phabricator configuration crashes when the environment variables PHABRICATOR_STORAGE_TYPE disk and PHABRICATOR_STORAGE_PATH /my/path are used. That is caused by a typo error of the phabricator storage path variable.

A fix for this problem is proposed here:
#26

Enhancement: php.ini for less file storage chunking

Some some configuration parts need to set values in the php.ini. But this container does not expose such a file for configuration. A search for php.ini in the container presents two results:
/etc/php5/cli/php.ini
/etc/php5/fpm/php.ini

Which php.ini should be exposed, e.g. with a volume mount?
What i want to achieve, is to configure the upload limit of the file storage backend, as described here:
https://secure.phabricator.com/book/phabricator/article/configuring_file_storage/

best,
Christian

aphlict config outdated

it seems like phabricator guys changed the way aphlict (notifications) work some time ago.

[ STARTING ] /etc/init.simple/40-aphlict
/srv/phabricator/phabricator /
Usage Exception: The notification server should not be run as root. It no longer requires access to privileged ports.
/

Cannot restart docker container

While restarting docker machine an error is returned and the machine keeps rebooting.

phabricator_search.edge OK
phabricator_search.edgedata OK
phabricator_search.search_document OK
phabricator_search.search_documentfield OK
phabricator_search.search_documentrelationship OK
phabricator_search.search_editengineconfiguration OK
phabricator_search.search_editengineconfigurationtransaction OK
phabricator_search.search_indexversion OK
phabricator_search.search_namedquery OK
phabricator_search.search_profilepanelconfiguration OK
phabricator_search.search_profilepanelconfigurationtransaction OK
phabricator_search.search_savedquery OK

  • /srv/phabricator/phabricator/bin/storage upgrade --force
    Storage is up to date. Use 'storage status' for details.
    Verifying database schemata...
    Found no adjustments for schemata.
  • '[' '' '!=' '' ']'
    [ STARTING ] /etc/init.simple/15-https
    mkdir: cannot create directory '/etc/nginx/servers': File exists
    mv: cannot stat '/etc/nginx/disabled-server-http.conf': No such file or directory
    chmod: cannot access '/etc/nginx.key': No such file or directory
    mv: cannot stat '/etc/nginx/disabled-server-https-manual.conf': No such file or directory
    [ FAILED ] /etc/init.simple/15-https

phabricator hosted repositories not created - permission denied

Initialization Error
Pull of "DC" failed: Command failed with error #128!
COMMAND git init --bare -- '/var/repo/DC'
STDOUT (empty)
STDERR fatal: cannot mkdir /var/repo/DC: Permission denied

4dda92483808:~ # ls -lia /var/repo
total 8
130770 drwxr-xr-x  2 root root 4096 Jun  7 12:45 .
    15 drwxr-xr-x 91 root root 4096 Jun  7 12:34 ..
4dda92483808:~ # ps auxw|grep Reposit
git        684  0.2  3.1 149232 32740 ?        Ss   12:34   0:02 php /srv/phabricator/libphutil/scripts/daemon/exec/exec_daemon.php PhabricatorRepositoryPullLocalDaemon

Not sure where one should correct the permissions. If I manually do git init --bare '/var/repo/DC' it then says it can't write to .git/hooks. What should I do? I'm new to docker.

Volume for local config

Hello,

when using Phabricator, I found out, that some config options are not stored in DB (phpmailer for example). To configure those options, one must use the bin/config utility, which stores configuration in the /srv/phabricator/phabricator/conf/local folder. I think that it would be helpful, if you could document to use volume for that folder, otherwise the config will be lost between the upgrades.

Thanks.

peter

Could you add bcrypt to the Image?

This is what I get in Edit Authentication Provider (Username/password)

Algorithm   | Name  | Strength  | Installed | Install Instructions
bcrypt  | bcrypt | Good | Not Installed | Upgrade to PHP 5.5.0 or newer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.