Sign inSign up

zarkasi/php-boilerplate

By zarkasi

Updated 3 months ago

My PHP Boilerplate for Project Based On php-fpm/cli alpine image, many extension have installed

Image
Languages & frameworks
Developer tools
0

3.3K

zarkasi/php-boilerplate repository overview

PHP Boilerplate

Suitcase for your container PHP Application, many extension has been installed also have supervisord installed.

Version/Tag
  • {VERSION_PHP}: this is version without nginx, using default php port 9000
  • {VERSION_PHP}-nginx: with nginx default configuration and auto expose port 80 and 443
  • {VERSION_PHP}-franken: this is version using frankenphp with static build, default port using is 8000
Path Configuration

location path for your php Application in

    /var/www/html

want to put your config nginx ? put in path

    /etc/nginx/http.d/{your_config}.conf
  ## in php 8.3, 8.4
    /etc/nginx/sites-available/{your_config}
    /etc/nginx/sites-enabled/{your_config} ## (symlink from /etc/nginx/sites-available)

supervisor worker conf in (except franken version)

    /etc/supervisor.d/{your_supervisor_config}.conf

caddyfile config location (franken version)

   /etc/caddy

Extension Installed

>= PHP 7
  • bcmath
  • bz2
  • calendar
  • exif
  • gd
  • gettext
  • imap
  • intl
  • imagick
  • mcrypt
  • memcached
  • mongodb
  • mysqli
  • openssl
  • pdo
  • pdo_mysql
  • pgsql
  • pdo_pgsql
  • redis
  • enchant
  • sockets
  • sysvsem
  • sysvshm
  • reflection
  • pcntl
  • pcre
  • msgpack
  • ctype
  • phar
  • posix
  • pspell
  • soap
  • sqlite3
  • tokenizer
  • xsl
  • zip
  • xml
  • xmlreader
  • xmlwriter
  • xmlrpc
PHP 5.6
  • bz2
  • exif
  • gd
  • gettext
  • imap
  • intl
  • mcrypt
  • mysqli
  • openssl
  • pdo
  • pdo_mysql
  • pgsql
  • pdo_pgsql
  • sockets
  • soap
  • sqlite3
  • tokenizer
  • xsl
  • zip
  • xml
  • xmlreader
  • xmlwriter
  • xmlrpc

Ways Using Franken Version

  1. you can put your root index.php at the /var/www/html
  2. you can specify in your Caddyfile config at /etc/caddy/Caddyfile, or
  3. at the last your dockerfile put this entrypoint command (make sure you set WORKDIR first)
CMD ["frankenphp", "php-server"]

running php command in franken version as usual like

php {{YOUR_PHP_COMMAND}}

running composer in franken version

php /usr/local/bin/composer {{install/update}}

Feedback

If you have any feedback, please reach out to us at [email protected]

Tag summary

Content type

Image

Digest

sha256:91e7b3f45

Size

236.8 MB

Last updated

3 months ago

docker pull zarkasi/php-boilerplate:8.5