Git Product home page Git Product logo

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.

IMPORTANT: this repo's purpose is mainly a tutorial to write docker development environment for Laravel projects. You're encouraged to replicate the setup on a more recent version of Laravel and its toolings.

Up and running

Clone the repo:

$ git clone https://github.com/veevidify/laravel-apache-docker.git
$ cd laravel-apache-docker

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

laravel-apache-docker's Issues

post_max_size and upload_max_filesize

Guys, would you take a look at this StackOverflow question? I'm using this project as a platform for a FileUpload process. It was supposed to be simple, but now things are getting complicated cause I cannot upload a file 52MB long.

How do I do that?

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.