Code Monkey home page Code Monkey logo

laravel-docker's Introduction

Laravel Dockerfiles

Requirements

Install sudo, docker and docker-compose. Don't forget to add user to docker group.

On Debian Jessie as root:

apt-get install -y sudo 
usermod -aG sudo <user>

wget -qO- https://get.docker.com/ | sh
# or use curl:
# curl -L http://get.docker.com/ | sh
usermod -aG docker <user>

apt-get install -y python-pip
pip install docker-compose

First sterps

  1. Create your laravel project
  2. Clone this repository into docker directory
  3. Make storage directory writeable for everyone

Usage

Command-line usage

# Run containers
docker-compose -f docker/docker-compose.yml up -d

# Run composer
docker-compose -f docker/docker-compose.yml run composer install

# Run artisan
docker-compose -f docker/docker-compose.yml run artisan migrate:install

Bash helper

You use up helper script:

docker/up composer install

You can create shortcut at root of your project:

ln -s docker/up laravel

Run:

./laravel up -d
./laravel composer update
./laravel artisan migrate:refresh --seed

P.S. Default laravel database host is localhost. At docker infrastructure host is database. So you must specify it at config/database.php or .env file:

DB_HOST=database

laravel-docker's People

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.