Giter Site home page Giter Site logo

fabianmuema / laravel-apache-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from veevidify/laravel-apache-docker

0.0 1.0 0.0 237 KB

Laravel with php-apache + mysql in a docker-compose.yml

Home Page: https://dev.to/veevidify/docker-compose-up-your-entire-laravel-apache-mysql-development-environment-45ea

PHP 79.04% Vue 0.51% HTML 18.42% Dockerfile 1.48% Shell 0.55%

laravel-apache-docker's Introduction

Laravel + Apache + Docker

Description

Start developing a fresh Laravel application with docker using docker-compose.

The images used in this repo is php:7.2-apache and mysql:5.7. The goal is to make setting up the development as simple as possible.

Up and running

Clone the repo:

$ git clone https://github.com/laravel/laravel.git
$ cd laravel

Copy .env.example to .env

$ cp .env.example .env 

Build the images and start the services:

docker-compose build
docker-compose up -d

Helper scripts

Running composer, php artisan or phpunit against the php container with helper scripts in the main directory:

container

Running ./container takes you inside the laravel-app container under user uid(1000) (same with host user)

$ ./container
devuser@8cf37a093502:/var/www/html$

db

Running ./db connects to your database container's daemon using mysql client.

$ ./db
mysql>

composer

Run composer command, example:

$ ./composer dump-autoload
Generating optimized autoload files> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
Generated optimized autoload files containing 3527 classes

php-artisan

Run php artisan commands, example:

$ ./php-artisan make:controller BlogPostController --resource
php artisan make:controller BlogPostController --resource
Controller created successfully.

phpunit

Run ./vendor/bin/phpunit to execute tests, example:

$ ./phpunit --group=failing
vendor/bin/phpunit --group=failing
PHPUnit 7.5.8 by Sebastian Bergmann and contributors.



Time: 34 ms, Memory: 6.00 MB

No tests executed!

laravel-apache-docker's People

Contributors

dependabot[bot] avatar honkinggoose avatar samnockels avatar veeeeeeeeeee avatar veevidify avatar

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.