lundi 28 mai 2018

Dockerizing existing Laravel app

I'd like some help please. I have git clone a remote Laravel repository from my Bitbucket locally, I've used phpdocker.io to generate my docker-compose and docker directory which I have copied under my root-laravel-direcory, so my folder structure looks like this:

my-laravel-app/
- app/  /* all usual folders and files that Laravel generates
- bootstrap/
- database/
...
- phpdocker/ /* the folder that phpdocker.io generates
- .env
- composer.json
- ...
- docker-compose.yml /* the docker-compose that phpdocker.io generates

This is the docker-compose.yml file

version: "3.1"
services:

    mysql:
      image: mysql:5.7
      container_name: my-laravel-app-mysql
      working_dir: /application
      volumes:
        - .:/application
      environment:
        - MYSQL_ROOT_PASSWORD=secret
        - MYSQL_DATABASE=homestead
        - MYSQL_USER=homestead
        - MYSQL_PASSWORD=secret
      ports:
        - "8890:3306"

    webserver:
      image: nginx:alpine
      container_name: my-laravel-app-webserver
      working_dir: /application
      volumes:
          - .:/application
          - ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
      ports:
       - "8888:80"

    php-fpm:
      build: phpdocker/php-fpm
      container_name: my-laravel-app-php-fpm
      working_dir: /application
      volumes:
        - .:/application
        - ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.1/fpm/conf.d/99-overrides.ini

When I run docker-compose up -d and try to access http://localhost:8888 I get a white screen with 500 error. How can I fix this?

enter image description here



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2xnGqYo
via IFTTT

Aucun commentaire:

Enregistrer un commentaire