Giter Club home page Giter Club logo

laravel-alpine's Introduction

laravel-alpine

Laravel PHP framework running on PHP-FPM with alpine base Docker Image ๐Ÿณ

Docker Automated build Docker Stars Docker Pulls GitHub

SIZE

Pull it from Docker Registry

To pull the docker image:

docker pull kamerk22/laravel-alpine:latest

Usage

To run from current dir

docker run -v $(pwd):/var/www kamerk22/laravel-alpine:latest "composer install --prefer-dist"

What's Included

  • Composer ( v2 - updated )
  • CRON ( pre-installed and configured to work with Laravel Scheduler )
  • Supervisor

Other Details

  • Alpine base image

PHP Extension

  • opcache
  • mysqli
  • pgsql
  • pdo
  • pdo_mysql
  • pdo_pgsql
  • sockets
  • json
  • intl
  • gd
  • xml
  • zip
  • bz2
  • pcntl
  • bcmath

Adding other PHP Extension

You can add additional PHP Extensions by running docker-ext-install command. Don't forget to install necessary dependencies for required extension.

FROM kamerk22/laravel-alpine:latest
RUN docker-php-ext-install memcached

Adding custom CRON

FROM kamerk22/laravel-alpine:latest
echo '0 * * ? * * /usr/local/bin/php  /var/www/artisan schedule:run >> /dev/null 2>&1' > /etc/crontabs/root 

Adding custom Supervisor config

You can add your own Supervisor config inside /etc/supervisor.d/ for Laravel Queue or Laravel Horizon. File extension needs to be *.ini. By default this image added php-fpm and crond process in supervisor.

E.g: For Laravel Horizon make file horizon.ini

[program:horizon]
process_name=%(program_name)s
command=php /home/forge/app.com/artisan horizon
autostart=true
autorestart=true
user=forge
redirect_stderr=true
stdout_logfile=/home/forge/app.com/horizon.log

On your Docker image

FROM kamerk22/laravel-alpine:latest
ADD horizon.ini /etc/supervisor.d/

For more details on config http://supervisord.org/configuration.html

Troubleshooting / Issues / Contributing

Feel free to open an issue in this repository or contact me on Twitter.

laravel-alpine's People

Contributors

kamerk22 avatar stalespace avatar sujalpatel2209 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.