Error While climbing Docker container

Asked

Viewed 329 times

2

When I give a Docker-Compose up, the container goes up normally, but when I access the localhost, from error 500, the page is not working, and in the console the following error text appears. I’m using the codecasts ambientum images.

restapi-app | [19-Mar-2019 11:38:15] WARNING: [pool www] child 15 said into stderr: "NOTICE: PHP message: PHP Warning:  require(/var/www/app/public/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/app/public/index.php on line 24"
restapi-app | 127.0.0.1 -  19/Mar/2019:11:38:15 +0000 "GET /index.php" 500
restapi-app | [19-Mar-2019 11:38:15] WARNING: [pool www] child 15 said into stderr: "NOTICE: PHP message: PHP Fatal error:  require(): Failed opening required '/var/www/app/public/../vendor/autoload.php' (include_path='.:') in /var/www/app/public/index.php on line 24"
restapi-app | 2019/03/19 11:38:15 [error] 12#12: *4 FastCGI sent in stderr: "PHP message: PHP Warning:  require(/var/www/app/public/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/app/public/index.php on line 24
restapi-app | PHP message: PHP Fatal error:  require(): Failed opening required '/var/www/app/public/../vendor/autoload.php' (include_path='.:') in /var/www/app/public/index.php on line 24" while reading response header from upstream, client: 172.23.0.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost"
restapi-app | 172.23.0.1 - - [19/Mar/2019:11:38:15 +0000] "GET / HTTP/1.1" 500 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36" "-"

I searched the internet, and tried to pass full permission for these folders but without success. My . yaml is as follows

# v2 syntax
version: '2'

# Named volumes
volumes:
  # MySQL Data
  restapi-mysql-data:
    driver: local

services:
  # MySQL (5.7)
  mysql:
    image: mysql:5.7
    container_name: restapi-mysql
    volumes:
      - restapi-mysql-data:/var/lib/mysql
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=restapi
      - MYSQL_DATABASE=restapi
      - MYSQL_USER=restapi
      - MYSQL_PASSWORD=restapi

  # PHP (with nginx)
  app:
    image: ambientum/php:7.2-nginx
    container_name: restapi-app
    volumes:
      - .:/var/www/app
    ports:
      - "80:8080"
    links:
      - mysql

The settings of . env pro mysql are already done. Does anyone have any light on what might be ? PS: It is a simple design of the Laravel created behind the new crú Laravel, I did not touch anything.

1 answer

0

The problem was solved, it was problem in my project Aravel, some files missing he n could climb the page (:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.