Giter Club home page Giter Club logo

docker-phabricator's Introduction

docker-phabricator

THIS IMAGE IS UNMAINTAINED

If you want to use it, please update https://github.com/yesnault/docker-phabricator/blob/master/Dockerfile#L39 before docker build it.

A docker composition for Phabricator :

Run with image from hub.docker.com - OUTDATED - NOT RECOMMANDED

Run a mysql container :

docker run --name databasePhabricator yesnault/docker-phabricator-mysql

Run phabricator :

docker run -p 8081:80 --link databasePhabricator:database yesnault/docker-phabricator 

Go to http://localhost:8081

docker-phabricator's People

Contributors

ausiv avatar bitdeli-chef avatar brianmichel avatar dereckson avatar dnephin avatar joycebabu avatar jsm avatar kalbasit avatar kilrogg avatar necrophcodr avatar neko1990 avatar sils avatar ustun avatar yesnault 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

docker-phabricator's Issues

Apache php.ini default

upload_max_filesize should be set in higher limit by default in /etc/php5/apache2/php.ini to resolve one to the "unresolved issues" during the initial phabricator configuration.

Use volume containers instead of host mounted volume

I'd recommend to use a volume container to split the data from the phabricator container.

I do this:

docker run --name="phabricator_data" \
-v /var/lib/mysql \
-v /var/repo \
-v /opt/phabricator/conf \
sils1297/centos /bin/echo phabricator data container

docker run --name="phabricator" -d --restart=always -p 80:80 -p 25:25 \
--volumes-from phabricator_data \
yesnault/docker-phabricator

This makes the whole thing independent from the hosts filesystem while keeping the data isolated. The phabricator_data container is just there to assure the volume doesnt get cleaned up if one docker rm's the phabricator container. Another advantage is that you dont have to fiddle with the permissions/selinux and so on on the host system which is usually ugly.

There will be no pull request for this since I use my own setup script together with other containers. Its just a suggestion of what I think might be better ;).

When I run containers both processes keeps open in terminal.

Hi, Your image is very helpful. But I am facing one issue. Whenever I run both containers in command line both processes keep open in command line. If I close the terminal both container's gets stopped. What should I do run these processes in background as others do ? Please help. Your help is much appreciated.

Sending emails is not possible

An important part especially for user creation are email notifications. It would be nice if the image could provide some easy means to set it up or set it up as automatically as possible.

Sugar on top would be the ability of receiving emails.

Phabricator Daemons Aren't Running

Phabricator has a number of daemons that are presumed to be running on the same host as the Apache service, but the docker container doesn't run the daemons. This means a number of features of Phabricator don't work. I've tried starting them with docker exec, and they start, but they start as root because the "sudo" command is unavailable on the image. The web service runs as www-data, so there are path permission conflicts if the daemons create a file that the web service will later need to edit.

Cannot start container

When I run docker run --name databasePhabricator yesnault/docker-phabricator-mysql and then docker run -p 8081:80 --link databasePhabricator:database yesnault/docker-phabricator, I get the next response on the second command

Error response from daemon: Cannot start container 7fe5f4cb95b72e7511fcb2a03889f237ec960d20372d942672dedb9a4a2fc263: Cannot link to a non running container: /databasePhabricator AS /evil_mcclintock/database

The first container stops running for a reason... Is there a way I can fix this?

Run daemons automatically

The Phabricator daemons are not running, so Phabricator will not be able to perform background processing (including sending email, rebuilding search indexes, importing commits, cleaning up old data, running builds, etc.).

Use bin/phd start to start daemons. See Managing Daemons with phd for more information.
Run this command:

phabricator/ $ ./bin/phd start

can't host repositories on phabricator

for http the /usr/bin/git-core directory has to go into phabricators path variable. After that there are some access problems. Would be nice to adress that.

No clear path to production

It would be really nice if you explained how to use this in a production context. As it stands the db does not persist past the life of a container, for example.

How can I access Mysql database or my phabricator data ?

[2017-04-06 06:17:20] EXCEPTION: (AphrontConnectionQueryException) Attempt to connect to admin@database failed with error #2005: Unknown MySQL server host 'database' (0). at [/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php:72]
arcanist(), phabricator(head=master, ref.master=8ff41264e495), phutil()

I am getting above exception while running ./bin/accountadmin in docker phabricator. As well my Mysql docker is not getting updated its database. How can I access the database and where the data is actually stored in these docker's ?

/etc/mysql/my.cnf should be customized

When you launch the docker-phabricator image, the following setup issues related to MySQL server configuration exist:

  • MySQL is Using Default Stopword File — MySQL is using a default stopword file, which will prevent searching for many common words.
  • MySQL is Using Default Minimum Word Length — MySQL is configured to only index words with at least 4 characters.
  • MySQL May Run Slowly — MySQL is configured with a very small innodb_buffer_pool_size, which may impact performance.

So, currently, the MySQL server launched in the container isn't compliant with the Phabricator recommended configuration.

For the two first issues, this is straightforward, a customized my.cnf file could include the two following lines:

ft_stopword_file=/opt/phabricator/resources/sql/stopwords.txt
ft_min_word_len=3

The last issue requires a strategic decision about the expected amount of RAM available to run Phabricator in a Docker container. The default value is 128 MB, I set 1024 MB on mine, and Phabricator will complain if the pool is < 225 MB (based on the fact 40% of an AWS EC2 Micro instance RAM is 245 MB).

I can't figure the ideal value for this setting, but it seems reasonable to consider 1 GB of RAM is the minimal expected memory allocation for a nginx + php-fpm + MySQL + some daemons for a small team. 40% would give 409.6 MB

innodb_buffer_pool_size=410M

date_default_timezone_get(): Timezone database is corrupt - this should *never* happen!

Hi!

I got this PHP error:

>>> UNRECOVERABLE FATAL ERROR <<<
date_default_timezone_get(): Timezone database is corrupt - this should *never* happen!
/opt/phabricator/src/infrastructure/env/PhabricatorEnv.php:94

I thought that setting date.timezone to something will repaire it. But no. And googling didn't help -
seems that nobody uses php with apache now.

Can Not Connect to MySQL

What are the proper user/pass values to make it connect? Or do we set this manually in mysql and phab's local config?

AphrontSchemaQueryException

I have Docker running on a remote Ubuntu VM (say, app01.example.com).

I ran:

docker run --name databasePhabricator yesnault/docker-phabricator-mysql

Then I ran:

docker run -p 8081:80 --link databasePhabricator:database yesnault/docker-phabricator

Just to verify everything started correctly, I ran docker logs sick_bartik (the docker-phabricator image) and saw this error message:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.7. Set the 'ServerName' directive globally to suppress this message

I then opened up a browser and went to http://app01.example.com:8081 and the Phabricator UI showed up. Great success! The first thing Phabricator wants you to do is set up an Admin account. So I filled out the simple form (admin username, name, email, etc.), submitted the form, and got the following exception:

screen shot 2015-09-24 at 11 56 30 am

Please advise!

Service 'database' failed to build: The command '/bin/sh -c bash /opt/mysql/setup.sh' returned a non-zero code: 1

Step 11/13 : RUN bash /opt/mysql/setup.sh
---> Running in 5dee9ed351fd
init mysql admin user
Installing MySQL system tables...
171019 5:31:17 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
171019 5:31:17 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
171019 5:31:17 [Note] /usr/sbin/mysqld (mysqld 5.5.57-0+deb8u1) starting as process 30 ...

Installation of system tables failed! Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

shell> /usr/sbin/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before submitting a bug report
at http://bugs.mysql.com/

ERROR: Service 'database' failed to build: The command '/bin/sh -c bash /opt/mysql/setup.sh' returned a non-zero code: 1

Unable to connect to MySQL!

Unable to connect to MySQL!

Attempt to connect to admin@database failed with error #2003: Can't connect to MySQL server on 'database' (111).

Access denied for user 'root'@'localhost'

Unable to connect to MySQL!

Attempt to connect to root@localhost failed with error #1045: Access denied for user 'root'@'localhost' (using password: NO).

Make sure Phabricator and MySQL are correctly configured.

fails with 'held broken packages'

running build.sh i get

⚡ 12:03 PM noon@master docker-phabricator>_ ./build.sh  
Sending build context to Docker daemon 59.39 kB
Sending build context to Docker daemon 
Step 0 : FROM ubuntu
 ---> e54ca5efa2e9
Step 1 : MAINTAINER Yvonnick Esnault <[email protected]>
 ---> Running in 6a465b6a3e79
 ---> c8e644b11c96
Removing intermediate container 6a465b6a3e79
Step 2 : RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
 ---> Running in ddfdc01bba8b
 ---> 054868b18563
Removing intermediate container ddfdc01bba8b
Step 3 : RUN apt-get update
 ---> Running in 1b9f1065a94d
Ign http://archive.ubuntu.com precise InRelease
Get:1 http://archive.ubuntu.com precise Release.gpg [198 B]
Get:2 http://archive.ubuntu.com precise Release [49.6 kB]
Get:3 http://archive.ubuntu.com precise/main amd64 Packages [1273 kB]
Get:4 http://archive.ubuntu.com precise/universe amd64 Packages [4786 kB]
Fetched 6109 kB in 18s (332 kB/s)
Reading package lists...
 ---> a80c65682aff
Removing intermediate container 1b9f1065a94d
Step 4 : RUN apt-get upgrade -y
 ---> Running in c5a0b2dc63ac
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 ---> 0c2ff16c726c
Removing intermediate container c5a0b2dc63ac
Step 5 : RUN apt-get install -y mysql-server mysql-client libmysqlclient-dev
 ---> Running in f609ed7c2c20
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmysqlclient-dev : Depends: zlib1g-dev but it is not going to be installed
 mysql-client : Depends: mysql-client-5.5 but it is not going to be installed
 mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
2014/07/05 12:03:36 The command [/bin/sh -c apt-get install -y mysql-server mysql-client libmysqlclient-dev] returned a non-zero code: 100

APC is not installed

Hi,

you may want to add the package php5-apc. This should speed up page loading a bit according to documentation. (Though I didnt tested if installing the package suffices. Its easy to test because the "PHP Extension 'APC' Not Installed" setup issue should vanish.)

Explain localhost.local vs localhost?

Not sure if this warrants opening issue, but it took me a minute to figure out to go to localhost.localdomain as that's how the hosts file is set up by default on arch linux. It might be worth noting in the readme how to configure the local domain, or how to figure out what yours is, as well as why it's necessary rather than just going directly to localhost (it seems to just be a requirement of phabricator).

I can write something up and do a PR if you're interested.

error when running containers

Here is what I get when running containers.

Bad "Host" Header
This request included an invalid "Host" header, with value "localhost:8081". Host headers must contain a dot ("."), like "example.com". This is required for some browsers to be able to set cookies.

This may mean the base URI is configured incorrectly. You must serve Phabricator from a base URI with a dot (like "https://phabricator.mycompany.com"), not a bare domain (like "https://phabricator/"). If you are trying to use a bare domain, change your configuration to use a full domain with a dot in it instead.

This might also mean that your webserver (or some other network device, like a load balancer) is mangling the "Host" header, or you are using a tool or library to issue a request manually and setting the wrong "Host" header.

Requests must include a valid "Host" header.
To continue, resolve this problem and reload the page.
Host: d3ddac3a4e17

how to configure phabricator

some configuration can't configure by web, must by command.Is there configuration file for me to change out of container

Can't run yesnault/docker-phabricator-mysql

docker run yesnault/docker-phabricator-mysql

160616 15:51:13 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
160616 15:51:13 mysqld_safe Logging to '/var/log/mysql/error.log'.
160616 15:51:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160616 15:51:13 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

this is on "Ubuntu 16.04 LTS".
ii docker.io 1.10.3-0ubuntu6 amd64 Linux container runtime

"httpd (pid %d) already running"

Hello there, I got the message the following message when I docker logs <container_id>:
"httpd (pid %d) already running"

I think that's was because my ubuntu was shutdown-ed.

Do you know how to kill the running httpd when I start the container?

Unhandled Exception ("AphrontSchemaQueryException")

When I launch the phabricator image with the mysql one you provide, I get :

Unhandled Exception ("AphrontSchemaQueryException")
#1054: Unknown column 'profileImageCache' in 'field list'

NOTE: This usually indicates that the MySQL schema has not been properly upgraded. Run 'bin/storage upgrade' to ensure your schema is up to date.

Use external database

Do you think there would be an easy way for this image to use an external mySQL database? This should be optional because your current setup is super awesome to get running quickly.

Fix MySQL STRICT_ALL_TABLES Mode Not Set warning

Phabricator gives the following warning:

On your MySQL instance, the global sql_mode is not set to STRICT_ALL_TABLES. It is strongly encouraged that you enable this mode when running Phabricator.

By default MySQL will silently ignore some types of errors, which can cause data loss and raise security concerns. Enabling strict mode makes MySQL raise an explicit error instead, and prevents this entire class of problems from doing any damage.

You can find more information about this mode (and how to configure it) in the MySQL manual. Usually, it is sufficient to add this to your my.cnf file (in the [mysqld] section) and then restart mysqld:

sql_mode=STRICT_ALL_TABLES

(Note that if you run other applications against the same database, they may not work in strict mode. Be careful about enabling it in these cases.)

Adding this should fix the problem.

RUN sed -i 's/\[mysqld\]/[mysqld]\nsql_mode=STRICT_ALL_TABLES/' /etc/mysql/my.cnf

Haven't tested this yet though.

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.