Skip to content

Commit c160ae3

Browse files
committed
Refactoring
1 parent e12af70 commit c160ae3

File tree

30 files changed

+180
-27
lines changed

30 files changed

+180
-27
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Dockerized PHP web project boilerplate
22

3-
![latest v3.5.0](https://img.shields.io/badge/latest-v3.5.0-green.svg?style=flat)
3+
[![latest v4.0.0](https://img.shields.io/badge/latest-v4.0.0-green.svg?style=flat)](https://github.com/mblaschke/php-docker-boilerplate/releases/tag/4.0.0)
44
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)
55
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/mblaschke/php-docker-boilerplate.svg)](http://isitmaintained.com/project/mblaschke/php-docker-boilerplate "Average time to resolve an issue")
66
[![Percentage of issues still open](http://isitmaintained.com/badge/open/mblaschke/php-docker-boilerplate.svg)](http://isitmaintained.com/project/mblaschke/php-docker-boilerplate "Percentage of issues still open")
77

8-
This is an easy customizable docker boilerplate for any PHP based projects like _Symfony Framework_, _CakePHP_ and many other frameworks or applications.
8+
This is an easy customizable docker boilerplate for any PHP based projects like _Symfony Framework_, _CakePHP_, _Yii_ and many other frameworks or applications.
99

1010
Supports:
1111

docker-compose.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Main php container
33
#######################################
44
main:
5-
build: docker/main/ubuntu # dynamic ubuntu version (ansible provisioning)
6-
#build: docker/main/centos # dynamic centos version (ansible provisioning)
5+
build: docker/main/ubuntu # dynamic ubuntu version (ansible provisioning)
6+
#build: docker/main/centos # dynamic centos version (ansible provisioning)
77
links:
88
- mysql
99
#- postgres
@@ -29,10 +29,8 @@ main:
2929
# Webserver
3030
#######################################
3131
web:
32-
# Apache HTTPD webserver
33-
build: docker/httpd/
34-
# Nginx webserver
35-
#build: docker/nginx/
32+
build: docker/web/httpd/ # Apache HTTPD webserver
33+
#build: docker/web/nginx/ # Nginx
3634
ports:
3735
- 8000:80
3836
- 8443:443
@@ -48,7 +46,7 @@ web:
4846
# MySQL server
4947
#######################################
5048
mysql:
51-
build: docker/mysql/
49+
build: docker/mysql/ # MySQL, MariaDB or PerconaDB
5250
ports:
5351
- 13306:3306
5452
volumes_from:

docker-env.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,17 @@ CLI_SCRIPT=php index.php
2121

2222
#######################################
2323
# Context environment
24+
25+
# Symfony
2426
SYMFONY_ENV=dev
2527
SYMFONY_DEBUG=0
2628

29+
# CakePHP
30+
CAKE_ENV=dev
31+
32+
# yii
33+
YII_ENVIRONMENT=Development
34+
2735
#######################################
2836
# Mail
2937

docker/elasticsearch/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
#++++++++++++++++++++++++++++++++++++++
2+
# Elasticsearch Docker container
3+
#++++++++++++++++++++++++++++++++++++++
4+
#
5+
# Official images:
6+
#
7+
# elasticsearch - official Elasticsaerch
8+
# https://registry.hub.docker.com/u/library/elasticsearch/
9+
#
10+
#++++++++++++++++++++++++++++++++++++++
11+
112
FROM elasticsearch

docker/mail/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
#++++++++++++++++++++++++++++++++++++++
2+
# Mailcatcher Docker container
3+
#++++++++++++++++++++++++++++++++++++++
4+
#
5+
# Images:
6+
#
7+
# schickling/mailcatcher
8+
# https://registry.hub.docker.com/u/schickling/mailcatcher/
9+
#
10+
#++++++++++++++++++++++++++++++++++++++
11+
112
FROM schickling/mailcatcher

docker/main/centos/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Official images:
1010
#
1111
# centos:7 - PHP 5.4
12+
# https://registry.hub.docker.com/u/library/centos/
1213
#
1314
#++++++++++++++++++++++++++++++++++++++
1415

docker/main/centos/conf/php.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ date.timezone = Europe/Berlin
1919
mysql.default_host = mysql
2020
mysqli.default_host = mysql
2121

22+
; Zend OPCache
23+
opcache.enable = 1
24+
opcache.memory_consumption = 128
25+
opcache.interned_strings_buffer = 8
26+
opcache.max_accelerated_files = 4000
27+
opcache.fast_shutdown = 1
28+
opcache.enable_cli = 1
29+
30+
; XDebug
2231
xdebug.remote_enable = 1
2332
xdebug.remote_connect_back = on
2433
xdebug.idekey = "docker"

docker/main/ubuntu/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# ubuntu:14.04 - PHP 5.5, LTS (trusty)
1616
# ubuntu:15.04 - PHP 5.6 (vivid)
1717
# ubuntu:15.10 - PHP 5.6 (wily)
18+
# https://registry.hub.docker.com/u/library/ubuntu/
1819
#
1920
#++++++++++++++++++++++++++++++++++++++
2021

docker/main/ubuntu/conf/php.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ date.timezone = Europe/Berlin
1919
mysql.default_host = mysql
2020
mysqli.default_host = mysql
2121

22+
; Zend OPCache
23+
opcache.enable = 1
24+
opcache.memory_consumption = 128
25+
opcache.interned_strings_buffer = 8
26+
opcache.max_accelerated_files = 4000
27+
opcache.fast_shutdown = 1
28+
opcache.enable_cli = 1
29+
30+
; XDebug
2231
xdebug.remote_enable = 1
2332
xdebug.remote_connect_back = on
2433
xdebug.idekey = "docker"

docker/main/ubuntu/provision/variables.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,7 @@ DOCKER:
3737
DNS_DOMAIN: "{{ lookup('env','DNS_DOMAIN') }}"
3838

3939
# Context
40-
SYMFONY_ENV: "{{ lookup('env','SYMFONY_ENV') }}"
41-
SYMFONY_DEBUG: "{{ lookup('env','SYMFONY_DEBUG') }}"
40+
SYMFONY_ENV: "{{ lookup('env','SYMFONY_ENV') }}"
41+
SYMFONY_DEBUG: "{{ lookup('env','SYMFONY_DEBUG') }}"
42+
CAKE_ENV: "{{ lookup('env','CAKE_ENV') }}"
43+
YII_ENVIRONMENT: "{{ lookup('env','YII_ENVIRONMENT') }}"

0 commit comments

Comments
 (0)