Skip to content

A stack for PHP application development/deployment with Docker

License

Notifications You must be signed in to change notification settings

rikkeisoft/docker-for-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-for-php

Build Status

A stack for running PHP7 application inside Docker containers.

Features

  • Using PHP-FPM 7.0.x, Nginx 1.10.x (stable) and MySQL 5.7.x (stable).
  • You can manage all logs in a directory (data/logs).
  • You can specify your own Nginx and PHP-FPM config.
  • All MySQL database files are saved in data/database.

Requirement

  • Docker Engine 1.13.0+
  • Docker Compose 1.11.0+

Installation

$ git clone [email protected]:rikkeisoft/docker-for-php.git deploy
$ docker-compose up -d

If you have problem with file permission, please ensure you set correct the owner, which PHP-FPM is running under, in php-fpm.conf. Then execute:

$ docker exec -it dockerforphp_php7_1 /usr/local/bin/fix_permission /app/storage

Notice:

  • By default, php7 is running under www-data user. So you don't need to use -u flag if you didn't change the default owner of PHP-FPM.

Usage

$ docker exec -it source_php7_1 /bin/bash
root@159466f09128:/app#

Contributing

All code contributions must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.

Fork the project, create a feature branch, and send a pull request.

If you would like to help take a look at the list of issues.

License

This project is released under the MIT License.
Copyright © 2017 Rikkeisoft Co. Ltd.,
Please see LICENSE for more information.