Cannot acces 'app/config/local.php'
sr-verde opened this issue · 8 comments
sr-verde commented
Mautic in Docker does not start. Here is the log:
mautic_1 | MySQL Database Created
mautic_1 | ========================================================================
mautic_1 |
mautic_1 | This server is now configured to run Mautic!
mautic_1 | The following information will be prefilled into the installer (keep password field empty):
mautic_1 | Host Name: mysql
mautic_1 | Database Name: mautic
mautic_1 | Database Username: mautic
mautic_1 | Database Password: xxxxxxx
mautic_1 |
mautic_1 | Writing initial Mautic config
mautic_1 |
mautic_1 | Warning: file_put_contents(/var/www/html/app/config/local.php): failed to open stream: No such file or directory in /makeconfig.php on line 46
mautic_1 |
mautic_1 | Could not write configuration file to /var/www/html/app/config/local.php, you can create this file with the following contents:
mautic_1 |
mautic_1 | <?php
mautic_1 | $parameters = array (
mautic_1 | 'db_driver' => 'pdo_mysql',
mautic_1 | 'install_source' => 'Docker',
mautic_1 | 'db_host' => 'mysql',
mautic_1 | 'db_name' => 'mautic',
mautic_1 | 'db_user' => 'mautic',
mautic_1 | 'db_password' => 'xxxxxxx',
mautic_1 | 'trusted_proxies' =>
mautic_1 | array (
mautic_1 | 0 => '0.0.0.0/0',
mautic_1 | ),
mautic_1 | 'default_timezone' => 'UTC',
mautic_1 | );
mautic_1 |
mautic_1 | chown: cannot access 'app/config/local.php': No such file or directory
Thats my docker-compose:
mautic:
image: mautic/mautic:latest
restart: always
depends_on:
- mysql
environment:
- MAUTIC_DB_HOST=mysql
- MAUTIC_DB_USER=mautic
- MAUTIC_DB_PASSWORD=xxxxxx
- MAUTIC_DB_NAME=mautic
- MAUTIC_RUN_CRON_JOBS="true"
- MAUTIC_TRUSTED_PROXIES=0.0.0.0/0
networks:
- default
mysql:
image: mariadb:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: xxxxxx
volumes:
- ./mariadb/db-init:/docker-entrypoint-initdb.d
- ./mariadb/data:/var/lib/mysql
ojonesjr commented
I too am having this exact issue. How can we get a modern version of the docker-compose file, since this is a version 1.0 file and compatibility is going back to 2017.
cboehme commented
This problem seems to be caused by commit 7c8432d that updated the if-condition which checks whether the sources have already been copied to /var/www/html/
. The new condition fails to evaluate to true if both files are missing.
I will prepare a pull request to propose a fix for the problem tonight.
sr-verde commented
No, running on Alpine Linux.
# uname -a
Linux radler 4.19.80-0-virt #1-Alpine SMP Fri Oct 18 11:51:24 UTC 2019 x86_64 Linux
# cat /etc/alpine-release
3.10.3
sr-verde commented
Thanks for fixing!
luizeof commented
I´m building new image on Dockerhub ;)
madmath03 commented