Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot acces 'app/config/local.php' #135

Closed
sr-verde opened this issue Nov 3, 2019 · 8 comments
Closed

Cannot acces 'app/config/local.php' #135

sr-verde opened this issue Nov 3, 2019 · 8 comments

Comments

@sr-verde
Copy link

sr-verde commented Nov 3, 2019

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
Copy link

ojonesjr commented Nov 4, 2019

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
Copy link

cboehme commented Nov 4, 2019

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
Copy link
Author

sr-verde commented Nov 4, 2019

Thanks, @cboehme.

@luizeof
Copy link
Member

luizeof commented Nov 4, 2019

@sr-verde running on osx?

@luizeof luizeof closed this as completed in dd30a12 Nov 4, 2019
luizeof added a commit that referenced this issue Nov 4, 2019
@sr-verde
Copy link
Author

sr-verde commented Nov 4, 2019

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
Copy link
Author

sr-verde commented Nov 4, 2019

Thanks for fixing!

@luizeof
Copy link
Member

luizeof commented Nov 4, 2019

I´m building new image on Dockerhub ;)

@madmath03
Copy link
Contributor

madmath03 commented Nov 4, 2019

Hi @luizeof ,

I also encountered this issue and wanted to fix but found this thread.

Instead of doing a rollback of 7c8432d, can't we have both the fix and original "code quality improvement" ?
Something like this :

if ! [ -e index.php ] && ! [ -e app/AppKernel.php ]; then

See #138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants