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

docker-composer up error #18

Closed lamjack closed 8 years ago

lamjack commented 8 years ago

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 root@172.17.0.3 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?

hach-que commented 8 years ago

You need to connect to the MySQL server and grant permissions to access from any host. The MySQL server by default only has root access from localhost, so you'll need to login and run a grant query to set up permissions.

On Mon, 14 Mar 2016, 22:16 JackLam notifications@github.com wrote:

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/mysqlphabricator: 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 root@172.17.0.3 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?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/hach-que-docker/phabricator/issues/18

lamjack commented 8 years ago

i was solved, thanks for all.

bweston92 commented 8 years ago

@lamjack how you fix this? According to the dockerfiles entry point (I use official MySQL) it should be already set to wildcard.

https://github.com/docker-library/mysql/blob/d7e71447ff3ad3c579ac3cca8c0dc090d11d4baf/5.7/docker-entrypoint.sh#L71

hach-que commented 8 years ago

@bweston92 That's a different Docker container to hachque/mariadb, which is the one in use for this issue. The hachque/mariadb docker container doesn't have a grant on all hosts by default (arguably it should because it's not very useful without it, but scripting it so that it only happens on first run is tricky and I haven't got the time to dedicate to it).

hach-que commented 8 years ago

I'm going to close this issue since the original question is solved (run the GRANT query to give other Docker containers access). If you have other questions about configuration, feel free to open another issue.