https://github.com/jkaninda/laravel-php-apache
🐳 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.
https://github.com/jkaninda/laravel-php-apache
docker laravel laravel-docker laravel-php-apache
Last synced: 6 months ago
JSON representation
🐳 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.
- Host: GitHub
- URL: https://github.com/jkaninda/laravel-php-apache
- Owner: jkaninda
- Created: 2022-06-26T10:03:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-27T17:58:42.000Z (about 3 years ago)
- Last Synced: 2025-04-14T01:16:54.076Z (6 months ago)
- Topics: docker, laravel, laravel-docker, laravel-php-apache
- Language: Shell
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/jkaninda/laravel-php-apache/actions)



# Laravel PHP-APACHE Docker image
> 🐳 Docker image for a PHP-APACHE container created to run Laravel or any php based applications.
- [Docker Hub](https://hub.docker.com/r/jkaninda/laravel-php-apache)
- [Github](https://github.com/jkaninda/laravel-php-apache)## 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:
```yml
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
```sh
docker-compose exec app /bin/bash```
### Laravel migration
```sh
php atisan migrate```
## Docker run
```sh
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 :wink: