RedpointArchive / phabricator

A Docker image that runs Phabricator, an open source software engineering tool
https://hub.docker.com/r/redpointgames/phabricator/
307 stars 98 forks source link

Some default PHP and MySQL config missing #65

Closed kuba-orlik closed 7 years ago

kuba-orlik commented 7 years ago

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 :)

tkambler commented 7 years ago

RE: MySQL setup issues - Phabricator does not handle this. It's up to you to configure MySQL correctly. If you're running the official MySQL Docker image, you can mount the following file into the container to resolve these issues:

[mysqld]
max_allowed_packet=500M
sql_mode=STRICT_ALL_TABLES
innodb_buffer_pool_size=3200M

[mysql]
max_allowed_packet=500M

RE: APCU - If you want to use this, add this to Phabricator's ENV variables:

ENABLE_APCU=true

RE: Alternate file domain - this is not something that Phabricator can do for you.

therealprof commented 7 years ago

@tkambler I think you're a bit missing the point here: The setup is provided by this repository but incomplete out-of-the-box so it generates the warnings. The mysql warnings can for instance be easily addressed by adding the line: command: [mysqld, --max-allowed-packet=33554432, --sql_mode=STRICT_ALL_TABLES, --innodb_buffer_pool_size=400M] to docker-compse.yml.

I haven't tried your

ENABLE_APCU=true

suggestion yet but a bit of playing by my colleague as well as a patch in a fork https://github.com/aohajin/phabricator/commit/b603c94ae815962b90e0d112876c070952c02416 do suggest that it is not quite so easy to get it to work. Also why wouldn't that be on by default with the documented option to turn it off?

hach-que commented 7 years ago

While you can run MySQL in a container with a persistent volume, it isn't always a great idea and as such the docker-compose.yml is intended as an example, not an out-of-the-box production configuration. We usually expect folks to be running MySQL on an external instance or service like RDS or Cloud SQL. In particular, the MySQL configuration in docker-compose.yml makes does not provide replication or backups, something you almost certainly want for a production instance of Phabricator.

ENABLE_APCU is turned off by default because it's been known to cause segfaults with certain Phabricator and PHP versions in the past.

therealprof commented 7 years ago

While you can run MySQL in a container with a persistent volume, it isn't always a great idea and as such the docker-compose.yml is intended as an example, not an out-of-the-box production configuration. We usually expect folks to be running MySQL on an external instance or service like RDS or Cloud SQL. In particular, the MySQL configuration in docker-compose.yml makes does not provide replication or backups, something you almost certainly want for a production instance of Phabricator.

I don't see any problem making backups or adding even more functionality to the MySQL instance. The flexibility of docker containers is a huge pro and and of the reasons why we use docker extensively; why I would want to run a dedicated server or an external database is completely beyond me. Also the intention of just providing an example does not exclude the possibility of making it sane at the same time.

ENABLE_APCU is turned off by default because it's been known to cause segfaults with certain Phabricator and PHP versions in the past.

I haven't seen those segfaults but isn't that exactly the purpose of putting everything into one container that known good versions come together? If a dud really slips through it's also rather simple to roll back to a previous version.

hach-que commented 7 years ago

I haven't seen those segfaults but isn't that exactly the purpose of putting everything into one container that known good versions come together? If a dud really slips through it's also rather simple to roll back to a previous version.

This container is automatically updated every day with the latest package versions. We run zypper up to ensure that the latest version of the package always has the latest security patches.

hach-que commented 7 years ago

Closing this as there is nothing to action here.