Skip to content

Commit

Permalink
Merge branch 'release/4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mblaschke committed Aug 13, 2015
2 parents 4c62ecd + 69ec2f0 commit db0b9c8
Show file tree
Hide file tree
Showing 103 changed files with 1,733 additions and 539 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
TYPO3 Docker Boilerplate Changelog
==================================

4.0.0 - 2015-08-13 - t3ugs @jweilandnet
---------------------------------------
- Seperated TYPO3 Docker Boilerplate and PHP Docker Boilerplate
- Switched to Ansible provisioning (playbook)
- Added multiple Ubuntu versions
- Added CentOS
- Added Ubuntu with HHVM
- Added development/production context
- Added blackfire.io
- Added possiblity to disable Xdebug and Blackfire
- Moved php.ini to `etc/php/development.ini` and `etc/php/production.ini`
- Added ssh key/config (`etc/ssh`) setting for `/home/.ssh/`
- Added possibility to use `supervisorctl` (only for root)
- Improved provisioning
- Refactored layout
- Added prebuilt Docker images

3.5.0 - 2015-06-23
-----------------------
- Added `ftp` container (with vsftpd)
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Dockerized PHP web project boilerplate
# Dockerized TYPO3 project boilerplate

![latest v3.5.0](https://img.shields.io/badge/latest-v3.5.0-green.svg?style=flat)
[![latest v4.0.0](https://img.shields.io/badge/latest-v4.0.0-green.svg?style=flat)](https://github.com/webdevops/TYPO3-docker-boilerplate/releases/tag/4.0.0)
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)
[![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")
[![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")

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.
This is an easy customizable TYPO3 docker boilerplate.

Supports:

Expand All @@ -25,18 +25,16 @@ Supports:
This Docker boilerplate based on the best practises and don't use too much magic.
Configuration of each docker container is available in the `docker/` directory - feel free to customize.

This boilerplate can also be used for any other web project eg. Symfony, Magento and more.
Just customize the makefile for your needs

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

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`
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`

## Table of contents

- [Installation and requirements](/documentation/INSTALL.md)
- [Updating docker boilerplate](/documentation/UPDATE.md)
- [Customizing](/documentation/CUSTOMIZE.md)
- [Services (Webserver, MySQL... Ports, Users, Passwords)](/documentation/SERVICES.md)
- [Docker Quickstart](/documentation/DOCKER-QUICKSTART.md)
- [Run your project](/documentation/DOCKER-STARTUP.md)
- [Container detail info](/documentation/DOCKER-INFO.md)
Expand Down
11 changes: 1 addition & 10 deletions bin/create-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.config.sh"

if [ "$#" -lt 1 ]; then
echo "No project type defined (either cms, neos, symfony or git)"
echo "No project type defined (either cms, neos or git)"
exit 1
fi

Expand All @@ -33,15 +33,6 @@ case "$1" in
execInDir "$CODE_DIR" "composer create-project typo3/neos-base-distribution \"$CODE_DIR\""
;;

###################################
## SYMFONY
###################################
"symfony")
curl -LsS http://symfony.com/installer > /tmp/symfony.$$.phar
execInDir "$CODE_DIR" "php /tmp/symfony.$$.phar new '$CODE_DIR'"
rm -f -- /tmp/symfony.$$.phar
;;

###################################
## GIT
###################################
Expand Down
15 changes: 11 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
# Main php container
#######################################
main:
build: docker/main/
build: docker/main
#dockerfile: Ubuntu-12.04 # Ubuntu 12.04 - PHP 5.3, LTS (precise)
dockerfile: Ubuntu-14.04 # Ubuntu 14.04 - PHP 5.5, LTS (trusty)
#dockerfile: Ubuntu-15.04 # Ubuntu 15.04 - PHP 5.6 (vivid)
#dockerfile: Ubuntu-15.10 # Ubuntu 15.10 - PHP 5.6 (wily)
#dockerfile: Ubuntu-HHVM # Ubuntu 14.04 - HHVM (trusty)
#dockerfile: Centos-7 # CentOS 7 - PHP 5.4
links:
- mysql
#- postgres
Expand All @@ -28,8 +34,9 @@ main:
# Webserver
#######################################
web:
build: docker/httpd/
#build: docker/nginx/
build: docker/web
dockerfile: Apache-Httpd # Apache HTTPd
#dockerfile: Nginx # Nginx
ports:
- 8000:80
- 8443:443
Expand All @@ -45,7 +52,7 @@ web:
# MySQL server
#######################################
mysql:
build: docker/mysql/
build: docker/mysql/ # MySQL, MariaDB or PerconaDB
ports:
- 13306:3306
volumes_from:
Expand Down
19 changes: 10 additions & 9 deletions docker-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ DOCUMENT_ROOT=code/
DOCUMENT_INDEX=index.php
CLI_SCRIPT=php typo3/cli_dispatch.phpsh

# SYMFONY FRAMEWORK
#DOCUMENT_ROOT=code/web/
#DOCUMENT_INDEX=app_dev.php
#CLI_SCRIPT=php app/console

# NEOS or FLOW
#DOCUMENT_ROOT=code/Web/
#DOCUMENT_INDEX=index.php
Expand All @@ -32,6 +27,16 @@ FLOW_REWRITEURLS=1
SYMFONY_ENV=dev
SYMFONY_DEBUG=0

#######################################
# PROVISION environment

# Context for provision [development|production]
PROVISION_CONTEXT=development

# PHP Modules
PROVISION_PHP_BLACKFIRE=1
PROVISION_PHP_XDEBUG=1

#######################################
# Mail

Expand Down Expand Up @@ -70,10 +75,6 @@ FTP_PASSWORD=dev
FTP_PATH=/data/ftp/
#FTP_PATH=/docker/code/

#######################################
# PHP Settings
PHP_TIMEZONE=UTC

#######################################
# Permission settings
EFFECTIVE_UID=1000
Expand Down
11 changes: 11 additions & 0 deletions docker/elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
#++++++++++++++++++++++++++++++++++++++
# Elasticsearch Docker container
#++++++++++++++++++++++++++++++++++++++
#
# Official images:
#
# elasticsearch - official Elasticsaerch
# https://registry.hub.docker.com/u/library/elasticsearch/
#
#++++++++++++++++++++++++++++++++++++++

FROM elasticsearch
15 changes: 0 additions & 15 deletions docker/httpd/Dockerfile

This file was deleted.

11 changes: 11 additions & 0 deletions docker/mail/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
#++++++++++++++++++++++++++++++++++++++
# Mailcatcher Docker container
#++++++++++++++++++++++++++++++++++++++
#
# Images:
#
# schickling/mailcatcher
# https://registry.hub.docker.com/u/schickling/mailcatcher/
#
#++++++++++++++++++++++++++++++++++++++

FROM schickling/mailcatcher
59 changes: 59 additions & 0 deletions docker/main/Centos-7
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#++++++++++++++++++++++++++++++++++++++
# Centos PHP Docker container
#++++++++++++++++++++++++++++++++++++++
#
# Prebuild images:
#
# webdevops/php-boilerplate:centos-7
#
# Official images:
#
# centos:7 - PHP 5.4
# https://registry.hub.docker.com/u/library/centos/
#
#++++++++++++++++++++++++++++++++++++++

FROM webdevops/php-boilerplate:centos-7

ENV PROVISION_SYS_UPDATE 0
ENV PROVISION_PHP_DISTRIBUTION php

ENV PATH /opt/ansible/bin:/bin:/usr/bin:/sbin:/usr/sbin
ENV PYTHONPATH /opt/ansible/lib
ENV ANSIBLE_LIBRARY /opt/ansible/library

##
# Bootstrap
##

COPY conf/centos/locale.conf /opt/docker/locale.conf
COPY bin/centos/bootstrap.sh /opt/docker/bin/bootstrap.sh
COPY bin/provision.sh /opt/docker/bin/provision.sh
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
COPY provision /opt/docker/provision/

RUN bash /opt/docker/bin/bootstrap.sh
RUN bash /opt/docker/bin/provision.sh bootstrap

##
# Customization
##

COPY bin/customization.sh /opt/docker/bin/customization.sh
RUN bash /opt/docker/bin/customization.sh

##
# Config
##

COPY bin/entrypoint.sh /entrypoint.sh
COPY conf/centos /opt/docker/conf/

EXPOSE 9000

VOLUME /docker/
WORKDIR /docker/code/

ENTRYPOINT ["/entrypoint.sh"]
CMD ["supervisord"]
24 changes: 0 additions & 24 deletions docker/main/Dockerfile

This file was deleted.

60 changes: 60 additions & 0 deletions docker/main/Ubuntu-12.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#++++++++++++++++++++++++++++++++++++++
# Ubuntu PHP Docker container
#++++++++++++++++++++++++++++++++++++++
#
# Prebuild images:
#
# webdevops/php-boilerplate:ubuntu-12.04
#
# Official images:
#
# ubuntu:12.04 - PHP 5.3, LTS (precise)
# https://registry.hub.docker.com/u/library/ubuntu/
#
#++++++++++++++++++++++++++++++++++++++

FROM webdevops/php-boilerplate:ubuntu-12.04

ENV PROVISION_SYS_UPDATE 0
ENV PROVISION_PHP_DISTRIBUTION php

# Ensure UTF-8
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8

##
# Bootstrap
##

COPY conf/ubuntu/locale.conf /opt/docker/locale.conf
COPY bin/ubuntu/bootstrap.sh /opt/docker/bin/bootstrap.sh
COPY bin/provision.sh /opt/docker/bin/provision.sh
COPY bin/logwatch.sh /opt/docker/bin/logwatch.sh
COPY bin/dnsmasq.sh /opt/docker/bin/dnsmasq.sh
COPY provision /opt/docker/provision/

RUN bash /opt/docker/bin/bootstrap.sh
RUN bash /opt/docker/bin/provision.sh bootstrap

##
# Customization
##

COPY bin/customization.sh /opt/docker/bin/customization.sh
RUN bash /opt/docker/bin/customization.sh

##
# Config
##

COPY bin/entrypoint.sh /entrypoint.sh
COPY conf/ubuntu /opt/docker/conf/

EXPOSE 9000

VOLUME /docker/
WORKDIR /docker/code/

ENTRYPOINT ["/entrypoint.sh"]
CMD ["supervisord"]
Loading

0 comments on commit db0b9c8

Please sign in to comment.