Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bkuhl/php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP

Docker Pulls

This container is intended to run Laravel application's queues, cron, etc. and thus comes with a few items to assist:

spatie/laravel-backup Dependencies

  • PHP extension zip
  • mysql-client for mysqldump support

For a container to run nginx/fpm for Laravel applications, check out bkuhl/fpm-nginx.

Crons, Queue Workers and Migrations

Overwrite the container's default command to perform various Laravel tasks.

  • Cron container: use command crond -f -d 8
  • Queue worker container: use command php /var/www/html/artisan queue:work --sleep=3 --tries=3 --timeout=0
  • Migrations container: use command php /var/www/html/artisan migrate --force

Example Dockerfile

FROM bkuhl/php:8

WORKDIR /var/www/html

# Copy the application files to the container
ADD --chown=www-data:www-data  . /var/www/html

USER www-data

# production-ready dependencies
RUN composer install --no-interaction --optimize-autoloader --no-dev --no-cache --prefer-dist

About

A php container with Laravel dependencies

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •