GithubHelp home page GithubHelp logo

robvanbentem / docker-laravel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mtmacdonald/docker-laravel

0.0 2.0 0.0 24.63 MB

A Docker container for Laravel web apps

License: MIT License

Shell 97.23% Nginx 2.77%

docker-laravel's Introduction

Ubuntu Docker container for Laravel web applications

Docker-laravel is a LEMP image for running Laravel web applications.

It extends docker-base, which contains Supervisor for process supervision, and other basic utilities. It is loosely inspired by phusion/baseimage-docker.

All packages for running a Laravel web app are bundled into a single image, based on Ubuntu 16.04 server.

These services run with process supervision:

  • cron
  • nginx
  • php-fpm (with extensions required for Laravel 5, plus php5-mysqlnd and and php5-curl)
  • mariadb-server
  • beanstalkd
  • artisan queue:listen (optional - uncomment /etc/supervisord/queue.conf)

These packages are preinstalled:

  • nano
  • curl
  • git
  • zip and unzip
  • php-cli
  • php-xdebug (installed, but disabled by default, see below)
  • composer
  • mariadb-client
  • nodejs with npm
  • phantomjs
  • wkhtmltopdf

Running a container

1. Download the public Docker image from Dockerhub:

	docker pull mtmacdonald/docker-laravel:version

2. Run the Docker image as a new Docker container:

	docker run -d \
	-p 80:80 -p 443:443 -p 3306:3306 \
	-v /home/app:/share \
	--restart=always \
	--name=appname \
	mtmacdonald/docker-laravel:version

Replace '/home/app' with the path to the Laravel application's root directory in the host. This directory is a shared volume and so can be used to access the application files in either the host or the container.

Managing the container

See the instructions in docker-base.

Installing Laravel

Laravel is not bundled in the Docker image. Laravel, or your own application, need to be installed manually:

In the container (see docker exec):

	cd /share
	git clone https://github.com/laravel/laravel .
	composer install
	chmod -R guo+w storage
	cp .env.example .env
	php artisan key:generate

XDebug

The XDebug PHP extension is installed but not enabled by default. To enable it:

	phpenmod xdebug
	phpenmod -s cli xdebug

docker-laravel's People

Contributors

lkoenigsberger avatar mtmacdonald avatar robvanbentem avatar

Watchers

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