Closed megabert closed 4 years ago
Did you run the setup process? Then in your point 2 the database should not be empty.
What do you want to do? This sounds like automating the installation?
I copied the config an individual file ConfigUser.php in the automated docker setup process. When I try to run the /setup url I get always redirected to /upgrade. I thought the setup process maybe called automatically.
I ran it without the copied ConfigUser.php and the setup works as normal. So: No Issue: User error.
Thanks for your help!
Can you publish your "Dockerfile" to build your Docker image? I am also interested on a solution based on alpine.
Hint: It is not a good to publish your password.
@IT-Experte
The Dockerfile and docker-compose.yml is here: https://gist.github.com/megabert/9bbd6d41be5465f2d07953bb627ba8cb
Maybe it's useful to you.
Thank you for you Dockerfile. I have created my Dockerfile, based on your and it is working with MySQL 8. I used the MySQL from Docker Hub, but it must work with MySQL 5.7 as well.
Her my hints:
ConfigUser.php 1.1. Don't create file config/ConfigUser.php. It will created by the setup process. 1.2. Or, If you have a pdns database, than you can copy your file "ConfigUser.php" into container. But then you call the update process http://pdnshost/update
MySQL 2.1 You must created a empty database (InnoDB) and your new database user. 2.2 Check the MySQL user security credentials. You can't working with 'user'@'localhost', becaue you use differend Docker container. You can use this 'user'@'172.17.0.%'. 2.3. Are you sure with the hostname from database "pdns manager-mysql" ? By me it is only "mysql". 2.4. Have you linked Docker container myql and pdnsmanager with option --link mysql1:mysql ?
Apache 3.1. Check your Apache config for your virtual host. The example is not working without "Require all granted".
<Directory /var/www/localhost/frontend>
Options FollowSymLinks
AllowOverride all
Require all granted
</Directory>
@IT-Experte
At the moment I do not plan to use pdnsmanager, since in my understanding pdnsmanager wants to setup the pdns-database itself. I prefer that powerdns does the db provisioning for itself and no foreign application like pdnsmanager writes own data(pdnsmanager users,...) into the powerdns-database. (In case I got this wrong, anybody feel free to correct me.).
Ok. Since powerdns-admin isn't a usable option, I resume with this task. I'm creating a new docker setup now.
Or, If you have a pdns database, than you can copy your file "ConfigUser.php" into container. But then you call the update process http://pdnshost/update
I will not do this. I would like to do the schema update myself. But I think the programmer of pdnsmanager knows better to do that. So I initially extend the pdns schema to schema_setup version 6 (the current version) and pdnsmanager will prompt automatically if there's any new update and the user has to click "upgrade" once when a new schema should be available.
I'll publish the new work(dockerfiles, scripts) shortly.
See at #101 for the current docker scripts.
Error message in Browser:
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
Steps to reproduce:
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
pdnsmanager-config:
Log file (/tmp/pdnsmanager.log)
Environment: Docker
App-Container: Alpine Linux 3.9 pdnsmanager 2.0.1 (from tar.gz) Packages apache2 apache2-ctl php7-apache2 php7-common php7 php7-apache2 php7-json php7-openssl php7-mysqlnd php7-mysqli php7-pdo php7-pdo_mysql
phpinfo.html.txt
DB-Container: Oracle Linux Server 7.6 Packages mysql-community-server-minimal-5.7.25-1.el7.x86_64