Coder Social home page Coder Social logo

webcore-docker-apache's Introduction

PHP & Apache docker container for Laravel / Webcore development

Laravel documentation

https://laravel.com/docs/5.6

Webcore documentation

https://dandisy.github.io/1.0.4/start.html

Building the apache container

build docker image

docker build -t sharnw/webcore-docker-apache -f Dockerfile .

Manage containers

launch containers (detached)

docker-compose up -d

kill containers

docker-compose down

Settings up your laravel apps

enter apache container bash prompt

docker exec -it web-apache /bin/bash

create a new laravel project

composer create-project --prefer-dist laravel/laravel <project-name>

create a new webcore project

composer create-project dandisy/webcore <project-name>

setup virtual host

add virtualhost files to vhosts/ e.g.


<VirtualHost *:80>
    ServerName dev.webcore

    DirectoryIndex index.php
    DocumentRoot /var/www/html/webcore-project/public

    <Directory />
        Order allow,deny
        Allow from all
        AllowOverride All
    </Directory>
    <Directory /var/www/html/webcore-project/public/>
        Order allow,deny
        Allow from all
        AllowOverride All
    </Directory>

    ErrorLog /var/log/php-error.log

</VirtualHost>

Possible DB error: The server requested authentication method unknown to the client

PHP has some issues with MySQL 8 which have not been patched yet. The current workaround (laravel/framework#23948) requires updating your config/database.php file:

    'connections' => [

        'mysql' => [
            'driver'      => 'mysql',
            'host'        => env( 'DB_HOST', '127.0.0.1' ),
            'port'        => env( 'DB_PORT', '3306' ),
            'database'    => env( 'DB_DATABASE', 'forge' ),
            'username'    => env( 'DB_USERNAME', 'forge' ),
            'password'    => env( 'DB_PASSWORD', '' ),
            'unix_socket' => env( 'DB_SOCKET', '' ),
            'charset'     => 'utf8mb4',
            'collation'   => 'utf8mb4_unicode_ci',
            'prefix'      => '',
            'strict'      => true,
            'engine'      => null,
            'modes'       => [
                'ONLY_FULL_GROUP_BY',
                'STRICT_TRANS_TABLES',
                'NO_ZERO_IN_DATE',
                'NO_ZERO_DATE',
                'ERROR_FOR_DIVISION_BY_ZERO',
                'NO_ENGINE_SUBSTITUTION',
            ],
        ],
    ],

webcore-docker-apache's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.