Giter Club home page Giter Club logo

laravel-nginx-php's Introduction

LARAVEL-NGINX-PHP

Build Status

This is a docker image that builds on corbosman/nginx-php to provide an easy to use docker image for laravel apps. You can run this container directly from your source directory. Note that it does not provide any additional services like databases, redis, etc. If you need those, you can easily run those together with this image through a docker-compose file. This image does provide a scheduler, migrations, and can start horizon if you use it. Feel free to request additonal services through the github repo issue tracker.

Supported Tags

This image can be run with different versions of PHP. Pick one of the versions below. Since these images are built automatically every day, it will always be the latest minor release within a version.

If you want to pin a specific version, there are also minor versions available.

Quick Reference

How to use this image

This image will start up nginx with php-fpm listening on port 80. The default site config expects the application to be mounted on /app, with the documentroot on /app/public.

$ docker run -e DB_HOST=postgres -e REDIS_HOST=redis -v ~/Code/myapp:/app laravel-nginx-php
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] migrations: executing... 
Nothing to migrate.
[cont-init.d] migrations: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting Horizon
[services.d] done.
[27-Apr-2020 13:29:59] NOTICE: fpm is running, pid 214
[27-Apr-2020 13:29:59] NOTICE: ready to handle connections
Horizon started successfully.

docker-compose

This image does not give you a full developer environment for your laravel application. There are other images for that. Any additional services like mysql or redis you need alongside this image can be started using docker-compose. Refer to the docker-compose documentation for more information.

timezone

The default timezone is Europe/Amsterdam. To use your own timezone add a TZ environment variable.

docker run -v ~/Code/myapp:/app corbosman/laravel-nginx-php:7.4 date
Sun Oct 20 14:14:55 CEST 2019
docker run -e TZ=America/New_York -v ~/Code/myapp:/app corbosman/laravel-nginx-php:7.4 date
Sun Oct 20 08:14:55 EDT 2019

Note

I use this image myself on personal projects. Feel free to comment or ask questions on the github repo.

laravel-nginx-php's People

Stargazers

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