Skip to content

Commit 8c8d386

Browse files
committed
Merge branch 'release/4.0.0'
2 parents 4c62ecd + d9d98de commit 8c8d386

File tree

108 files changed

+1757
-665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1757
-665
lines changed

CHANGELOG.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1-
TYPO3 Docker Boilerplate Changelog
1+
PHP Docker Boilerplate Changelog
22
==================================
33

4+
4.0.0 - 2015-08-17
5+
------------------
6+
- Seperated TYPO3 Docker Boilerplate and PHP Docker Boilerplate
7+
- Switched to Ansible provisioning (playbook)
8+
- Added multiple Ubuntu versions
9+
- Added CentOS
10+
- Added Ubuntu with HHVM
11+
- Added development/production context
12+
- Added blackfire.io
13+
- Added possiblity to disable Xdebug and Blackfire
14+
- Moved php.ini to `etc/php/development.ini` and `etc/php/production.ini`
15+
- Added ssh key/config (`etc/ssh`) setting for `/home/.ssh/`
16+
- Added possibility to use `supervisorctl` (only for root)
17+
- Improved provisioning
18+
- Refactored layout
19+
- Added prebuilt Docker images
20+
421
3.5.0 - 2015-06-23
522
-----------------------
623
- Added `ftp` container (with vsftpd)

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
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/webdevops/php-docker-boilerplate/releases/tag/4.0.0)
44
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)
5-
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/mblaschke/typo3-docker-boilerplate.svg)](http://isitmaintained.com/project/mblaschke/typo3-docker-boilerplate "Average time to resolve an issue")
6-
[![Percentage of issues still open](http://isitmaintained.com/badge/open/mblaschke/typo3-docker-boilerplate.svg)](http://isitmaintained.com/project/mblaschke/typo3-docker-boilerplate "Percentage of issues still open")
5+
[![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")
6+
[![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 _TYPO3 CMS_, _Symfony Framework_, _FLOW/NEOS_ 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

1212
- Nginx or Apache HTTPd
1313
- PHP-FPM (with Xdebug)
1414
- MySQL, MariaDB or PerconaDB
1515
- PostgreSQL
16-
- Solr (disabled, with TYPO3 CMS EXT:solr configuration as example)
16+
- Solr (disabled, without configuration)
1717
- Elasticsearch (disabled, without configuration)
1818
- Redis (disabled)
1919
- Memcached (disabled)
2020
- Mailcatcher (if no mail sandbox is used, eg. [Vagrant Development VM](https://github.com/mblaschke/vagrant-development))
2121
- FTP server (vsftpd)
22-
- Support for `TYPO3_CONTEXT` and `FLOW_CONTEXT` for TYPO3, FLOW, NEOS.
2322
- maybe more later...
2423

2524
This Docker boilerplate based on the best practises and don't use too much magic.
2625
Configuration of each docker container is available in the `docker/` directory - feel free to customize.
2726

28-
This boilerplate can also be used for any other web project eg. Symfony, Magento and more.
27+
This boilerplate can also be used for any other web project eg. Symfony, CakePHP, Magento and more.
2928
Just customize the makefile for your needs
3029

3130
Warning: There may be issues when using it in production - if you have any success stories please contact me.
3231

33-
Use can use my [Vagrant Development VM](https://github.com/mblaschke/vagrant-development) for this Docker boilerplate, eg. for easy creating new boilerplate installations with an easy shell command: `ct docker:create directory`
32+
You can use my [Vagrant Development VM](https://github.com/mblaschke/vagrant-development) for this Docker boilerplate, eg. for easy creating new boilerplate installations with an easy shell command: `ct docker:create directory`
3433

3534
## Table of contents
3635

3736
- [Installation and requirements](/documentation/INSTALL.md)
3837
- [Updating docker boilerplate](/documentation/UPDATE.md)
3938
- [Customizing](/documentation/CUSTOMIZE.md)
39+
- [Services (Webserver, MySQL... Ports, Users, Passwords)](/documentation/SERVICES.md)
4040
- [Docker Quickstart](/documentation/DOCKER-QUICKSTART.md)
4141
- [Run your project](/documentation/DOCKER-STARTUP.md)
4242
- [Container detail info](/documentation/DOCKER-INFO.md)

bin/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true
88
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.config.sh"
99

1010
function excludeFilter {
11-
cat | grep -v -E -e '(/typo3/|/typo3_src|/fileadmin/|/typo3temp/|/uploads/|/Packages/|/Data/|/vendor/)'
11+
cat | grep -v -E -e '(/Packages/|/Data/|/vendor/)'
1212
}
1313

1414
#######################################
@@ -59,7 +59,7 @@ done
5959
## Gulp
6060
#######################################
6161

62-
sectionHeader "Checking for gulpfile.js in T3 Root ..."
62+
sectionHeader "Checking for gulpfile.js ..."
6363

6464
find "$CODE_DIR" -type f -name 'package.json' | excludeFilter | while read FILE; do
6565
GULPFILE_DIR=$(dirname $($READLINK -f "$FILE"))

bin/create-project.sh

-15
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,6 @@ chmod 777 "$CODE_DIR/"
1818
rm -f -- "$CODE_DIR/.gitkeep"
1919

2020
case "$1" in
21-
###################################
22-
## TYPO3 CMS
23-
###################################
24-
"typo3")
25-
execInDir "$CODE_DIR" "composer create-project typo3/cms-base-distribution \"$CODE_DIR\""
26-
execInDir "$CODE_DIR" "touch FIRST_INSTALL"
27-
;;
28-
29-
###################################
30-
## TYPO3 NEOS
31-
###################################
32-
"neos")
33-
execInDir "$CODE_DIR" "composer create-project typo3/neos-base-distribution \"$CODE_DIR\""
34-
;;
35-
3621
###################################
3722
## SYMFONY
3823
###################################

docker-compose.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
# Main php container
33
#######################################
44
main:
5-
build: docker/main/
5+
build: docker/main
6+
#dockerfile: Ubuntu-12.04 # Ubuntu 12.04 - PHP 5.3, LTS (precise)
7+
dockerfile: Ubuntu-14.04 # Ubuntu 14.04 - PHP 5.5, LTS (trusty)
8+
#dockerfile: Ubuntu-15.04 # Ubuntu 15.04 - PHP 5.6 (vivid)
9+
#dockerfile: Ubuntu-15.10 # Ubuntu 15.10 - PHP 5.6 (wily)
10+
#dockerfile: Ubuntu-HHVM # Ubuntu 14.04 - HHVM (trusty)
11+
#dockerfile: Centos-7 # CentOS 7 - PHP 5.4
612
links:
713
- mysql
814
#- postgres
@@ -28,8 +34,9 @@ main:
2834
# Webserver
2935
#######################################
3036
web:
31-
build: docker/httpd/
32-
#build: docker/nginx/
37+
build: docker/web
38+
dockerfile: Apache-Httpd # Apache HTTPd
39+
#dockerfile: Nginx # Nginx
3340
ports:
3441
- 8000:80
3542
- 8443:443
@@ -45,7 +52,7 @@ web:
4552
# MySQL server
4653
#######################################
4754
mysql:
48-
build: docker/mysql/
55+
build: docker/mysql/ # MySQL, MariaDB or PerconaDB
4956
ports:
5057
- 13306:3306
5158
volumes_from:

docker-env.yml

+25-19
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,39 @@
99
#######################################
1010
# Webserver
1111

12-
# TYPO3 CMS
12+
# General
1313
DOCUMENT_ROOT=code/
1414
DOCUMENT_INDEX=index.php
15-
CLI_SCRIPT=php typo3/cli_dispatch.phpsh
15+
CLI_SCRIPT=php index.php
1616

17-
# SYMFONY FRAMEWORK
18-
#DOCUMENT_ROOT=code/web/
19-
#DOCUMENT_INDEX=app_dev.php
20-
#CLI_SCRIPT=php app/console
21-
22-
# NEOS or FLOW
23-
#DOCUMENT_ROOT=code/Web/
24-
#DOCUMENT_INDEX=index.php
25-
#CLI_SCRIPT=php flow
17+
# Symfony
18+
# DOCUMENT_ROOT=code/web/
19+
# DOCUMENT_INDEX=app_dev.php
20+
# CLI_SCRIPT=php app/console
2621

2722
#######################################
2823
# Context environment
29-
TYPO3_CONTEXT=Development/Docker
30-
FLOW_CONTEXT=Development/Docker
31-
FLOW_REWRITEURLS=1
24+
25+
# Symfony
3226
SYMFONY_ENV=dev
3327
SYMFONY_DEBUG=0
3428

29+
# CakePHP
30+
CAKE_ENV=dev
31+
32+
# yii
33+
YII_ENVIRONMENT=Development
34+
35+
#######################################
36+
# PROVISION environment
37+
38+
# Context for provision [development|production]
39+
PROVISION_CONTEXT=development
40+
41+
# PHP Modules
42+
PROVISION_PHP_BLACKFIRE=1
43+
PROVISION_PHP_XDEBUG=1
44+
3545
#######################################
3646
# Mail
3747

@@ -56,7 +66,7 @@ DNS_DOMAIN=vm vm.dev
5666
MYSQL_ROOT_PASSWORD=dev
5767
MYSQL_USER=dev
5868
MYSQL_PASSWORD=dev
59-
MYSQL_DATABASE=typo3
69+
MYSQL_DATABASE=database
6070

6171
#######################################
6272
# PostgreSQL settings
@@ -70,10 +80,6 @@ FTP_PASSWORD=dev
7080
FTP_PATH=/data/ftp/
7181
#FTP_PATH=/docker/code/
7282

73-
#######################################
74-
# PHP Settings
75-
PHP_TIMEZONE=UTC
76-
7783
#######################################
7884
# Permission settings
7985
EFFECTIVE_UID=1000

docker/elasticsearch/Dockerfile

+11
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/httpd/Dockerfile

-15
This file was deleted.

docker/mail/Dockerfile

+11
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-7

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#++++++++++++++++++++++++++++++++++++++
2+
# Centos PHP Docker container
3+
#++++++++++++++++++++++++++++++++++++++
4+
#
5+
# Prebuild images:
6+
#
7+
# webdevops/php-boilerplate:centos-7
8+
#
9+
# Official images:
10+
#
11+
# centos:7 - PHP 5.4
12+
# https://registry.hub.docker.com/u/library/centos/
13+
#
14+
#++++++++++++++++++++++++++++++++++++++
15+
16+
FROM webdevops/php-boilerplate:centos-7
17+
18+
ENV PROVISION_SYS_UPDATE 0
19+
ENV PROVISION_PHP_DISTRIBUTION php
20+
21+
ENV PATH /opt/ansible/bin:/bin:/usr/bin:/sbin:/usr/sbin
22+
ENV PYTHONPATH /opt/ansible/lib
23+
ENV ANSIBLE_LIBRARY /opt/ansible/library
24+
25+
##
26+
# Bootstrap
27+
##
28+
29+
COPY conf/centos/locale.conf /opt/docker/locale.conf
30+
COPY bin/centos/bootstrap.sh /opt/docker/bin/bootstrap.sh
31+
COPY bin/provision.sh /opt/docker/bin/provision.sh
32+
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
33+
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
34+
COPY provision /opt/docker/provision/
35+
36+
RUN bash /opt/docker/bin/bootstrap.sh
37+
RUN bash /opt/docker/bin/provision.sh bootstrap
38+
39+
##
40+
# Customization
41+
##
42+
43+
COPY bin/customization.sh /opt/docker/bin/customization.sh
44+
RUN bash /opt/docker/bin/customization.sh
45+
46+
##
47+
# Config
48+
##
49+
50+
COPY bin/entrypoint.sh /entrypoint.sh
51+
COPY conf/centos /opt/docker/conf/
52+
53+
EXPOSE 9000
54+
55+
VOLUME /docker/
56+
WORKDIR /docker/code/
57+
58+
ENTRYPOINT ["/entrypoint.sh"]
59+
CMD ["supervisord"]

docker/main/Dockerfile

-24
This file was deleted.

0 commit comments

Comments
 (0)