Skip to content

🐳 Docker image for PHP-APACHE container crafted to run Laravel or any php based applications, with extensions for Redis, Memcached, MySQL, Postgres, Events, Redis, Laravel Schedule, Cron job and custom default configuration.

Notifications You must be signed in to change notification settings

jkaninda/laravel-php-apache

Repository files navigation

GitHub Workflow Status Docker Cloud Build Status Docker Cloud Automated build Docker Image Size (latest by date) Docker Pulls

Laravel PHP-APACHE Docker image

🐳 Docker image for a PHP-APACHE container created to run Laravel or any php based applications.

Specifications:

  • PHP 8.1 / 8.0 / 7.4 / 7.2
  • Composer
  • OpenSSL PHP Extension
  • XML PHP Extension
  • PDO PHP Extension(pdo_mysql,pdo_pgsql)
  • Redis PHP Extension
  • Mbstring PHP Extension
  • PCNTL PHP Extension
  • ZIP PHP Extension
  • GD PHP Extension
  • BCMath PHP Extension
  • Memcached
  • Laravel Cron Job
  • Laravel Schedule
  • Laravel Envoy
  • Supervisord

Simple docker-compose usage:

version: '3'
services:
    app:
        image: jkaninda/laravel-php-apache:latest
        container_name: app
        restart: unless-stopped   
        ports:
         - "80:80"   
        volumes:
        #Project root
            - ./:/var/www/html
            #- ~/.ssh:/root/.ssh # If you use private CVS
        environment:
           - APP_ENV=development # Optional, or production
           #- LARAVEL_PROCS_NUMBER=1 # Optional, Laravel queue:work process number    
        networks:
            - default #if you're using networks between containers

Laravel artisan command usage:

Open php-fpm

docker-compose exec app /bin/bash

Laravel migration

php atisan  migrate

Docker run

 docker-compose up -d

Supervisord

Add more supervisor process in

/var/www/html/conf/worker/supervisor.conf

Custom php.ini

/var/www/html/conf/php/php.ini

Storage permision issue

docker-compose exec app /bin/bash

chown -R www-data:www-data /var/www/html/storage

chmod -R 775 /var/www/html/storage

P.S. please give a star if you like it 😉

About

🐳 Docker image for PHP-APACHE container crafted to run Laravel or any php based applications, with extensions for Redis, Memcached, MySQL, Postgres, Events, Redis, Laravel Schedule, Cron job and custom default configuration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published