Coder Social home page Coder Social logo

laravel-docker-dev's Introduction

Laravel Docker Dev

This is a image for you to quickly start running a Laravel application in docker. The image contains xdebug so you don't want to use it for production.

Volumes mount

/app - The directory the application should be mounted to

Enable xDebug (OSX)

Since I personally develop apps in OSX, so I've created the image contains the predefined xdebug remote host.

OSX Quirks

This is a solution for using xDebug in OSX. Read more details

For people don't want to read text, please just run the command below.

sudo curl -o /Library/LaunchDaemons/com.ralphschindler.docker_10254_alias.plist https://gist.githubusercontent.com/ralphschindler/535dc5916ccbd06f53c1b0ee5a868c93/raw/com.ralphschindler.docker_10254_alias.plist

After reboot you will have the alias set up.

Or, you just want to try it out without rebooting or adding a startup script:

ifconfig lo0 alias 10.254.254.254

A sample usage with docker-compose

docker-composer.yml

version: '3'
services:
  php:
    image: chcjonathanguo/laravel-docker-dev:latest
    links:
      - "db:db"
    volumes:
      - ./:/app:delegated
    ports:
      - '8000:80'
  db:
    image: mysql:5.7
    restart: always
    volumes:
      - db-data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD:
      MYSQL_DATABASE: app
      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
    ports:
      - '33060:3306'
volumes:
    db-data:

laravel-docker-dev's People

Contributors

jonathanguo 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.