friendica / docker

Docker image for Friendica
https://friendi.ca
GNU Affero General Public License v3.0
45 stars 18 forks source link

friendica apache docker does not connect to mysql database #159

Closed nomadbl closed 2 years ago

nomadbl commented 3 years ago

Hello. I tried yesterday to set up friendica with the apache+friendica docker (image friendica:latest). At first I tried to set up with a mysql DB. However although I got the install screens, I could not get past the database connection screen (it said it could not connect to the DB). I spun up a PhpMyAdmin container and verified the DB was funtional with the friendica DB I created ahead of time empty but accessible. Seeing as many examples on the docker readme are using mariadb, I switched to it, and everything worked fine with the exact same configuration.

the docker compose was approximately:

db:
    image: mariadb [or mysql:latest]
    restart: always
    environment:
      MYSQL_USER: friendica
      MYSQL_PASSWORD: pass
      MYSQL_DATABASE: friendica
      MYSQL_HOST: db

  app:
    image: friendica
    restart: always
    environment:
      MYSQL_HOST: db
      MYSQL_USER: friendica
      MYSQL_PASSWORD: pass
      MYSQL_DATABASE: friendica
      FRIENDICA_ADMIN_MAIL: email@gmail.com
      FRIENDICA_URL: my.adr
nupplaphil commented 3 years ago

I think mysql needs additional parameters. Using your settings 1:1 results at this error:

2021-07-31 19:12:36+00:00 [ERROR] [Entrypoint]: Database is uninitialized and password option is not specified
2021-07-31T19:12:36.302707485Z     You need to specify one of the following:
2021-07-31T19:12:36.302710998Z     - MYSQL_ROOT_PASSWORD
2021-07-31T19:12:36.302713735Z     - MYSQL_ALLOW_EMPTY_PASSWORD
2021-07-31T19:12:36.302716468Z     - MYSQL_RANDOM_ROOT_PASSWORD
nupplaphil commented 2 years ago

closed because of no feedback so far :-) @nomadbl feel free to reopen it again