friendica apache docker does not connect to mysql database
nomadbl opened this issue · comments
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
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