diff --git a/.dockerignore b/.dockerignore
index d4882a7..afe4378 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,7 +1,7 @@
*.md
.git*
-/backup/
-/bin/
-/documentation/
-/docker/
-/code/
+backup/*
+bin/*
+app/*
+docker/*
+documentation/*
diff --git a/.editorconfig b/.editorconfig
index ff6fa56..4a62c51 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -19,3 +19,7 @@ indent_size = 2
[*.conf]
indent_size = 2
+
+[*.rst]
+indent_style = space
+indent_size = 3
diff --git a/.gitignore b/.gitignore
index 8dcdd08..e0e264c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,5 @@
.idea
nbproject
/backup/*
-/code/*
-/docker/sourcecode/code/*
+/app/*
/docker-compose.yml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5bc5d28..092f357 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,13 +1,62 @@
PHP Docker Boilerplate Changelog
==================================
-5.0.0 - UPCOMING
-----------------
+5.2.0-beta3 - 2017-01-18
+------------------------
+- Reverted changes in docker-compose.development.yml (ports)
+- Introducted docker-compose.development-reverse-proxy.yml for reverse proxy usage
+
+5.2.0-beta2 - 2016-12-06
+------------------------
+- Remove port exposures
+- DEV: Redirect all mails to mailcatcher (see environment var POSTFIX_RELAYHOST)
+- Add mail-sandbox with roundcube
+
+5.2.0-beta1 - 2016-10-18
+------------------------
+- Add dinghy/dory support
+- Switch to mailhog instead of mailcatcher
+- Add phpmyadmin
+- Switch to ubuntu 16.04 as default
+- docker-compose.yml is now using version 2
+- PHP debugger can now be switched with variable
+- Add PostgreSQL 9.5
+- Some minor fixes and cleanups
+
+5.1.3 - 2016-05-25
+------------------
+- Fix nginx vhost configuration (modular WebDevOps image design)
+
+5.1.2 - 2016-05-25
+------------------
+- Fix typo in Docker image names (duplicate -dev)
+
+5.1.1 - 2016-05-24
+------------------
+- Fixed Docker image names in Dockerfile.development
+- Updated nginx and apache vhost configuration
+
+5.1.0 - 2016-05-23
+------------------
+- Add support for new WebDevOps Docker images 0.5.0 and up
+- Removed xdebug and blackfire, for xdebug use php-dev, php-apache-dev, php-nginx-dev images
+
+5.0.2 - 2016-05-09
+------------------
+- Added exit if solr entrypoint is failing inside
+- Fix solr storage
+- Add `make shell` and `make root` (Makefile targets)
+- Refactored backup and restore (solr and mysql, see Makefile)
+
+5.0.0 - 2016-03-07
+------------------
- Refactored with new `webdevops/base` images
- Faster creation/startup times
- Ansible provisioning
- Real production and development provisioning
- Added cloud support (without host mounted volumes)
+- Moved `code/` to `app/` (Moved `/application/code` to `/app` inside Docker container)
+- Renamed `main` to `app` container
4.1.0 - canceled
------------------
@@ -15,6 +64,7 @@ PHP Docker Boilerplate Changelog
- Improved documentation
- Splitted MySQL Dockerfiles (with version and fork - MySQL, MariaDB and Percona)
- Fixed slow shutdown of storage (thanks to Stephan Ferraro)
+- Added MySQL host and port as environment variables
4.0.0 - 2015-08-17
------------------
diff --git a/Dockerfile.cloud b/Dockerfile.cloud
index 90d6f1c..6e82651 100644
--- a/Dockerfile.cloud
+++ b/Dockerfile.cloud
@@ -1,27 +1,50 @@
#++++++++++++++++++++++++++++++++++++++
-# Application Docker container
+# PHP application Docker container
#++++++++++++++++++++++++++++++++++++++
#
# PHP-Versions:
-# ubuntu-12.04 -> PHP 5.3, LTS (precise)
-# ubuntu-14.04 -> PHP 5.5, LTS (trusty)
-# ubuntu-15.04 -> PHP 5.6 (vivid)
-# ubuntu-15.10 -> PHP 5.6 (wily)
-# centos-7 -> PHP 5.4
+# 5.6 -> PHP 5.6 official PHP image
+# 7.0 -> PHP 7.0 official PHP image
+# 7.1 -> PHP 7.1 official PHP image
+# ubuntu-12.04 -> PHP 5.3 (precise) LTS
+# ubuntu-14.04 -> PHP 5.5 (trusty) LTS
+# ubuntu-15.04 -> PHP 5.6 (vivid)
+# ubuntu-15.10 -> PHP 5.6 (wily)
+# ubuntu-16.04 -> PHP 7.0 (xenial) LTS
+# centos-7 -> PHP 5.4
+# debian-7 -> PHP 5.4 (wheezy)
+# debian-8 -> PHP 5.6 and 7.x (jessie)
+# debian-9 -> PHP 7.0 (stretch)
#
# Apache:
+# webdevops/php-apache:5.6
+# webdevops/php-apache:7.0
+# webdevops/php-apache:7.1
# webdevops/php-apache:ubuntu-12.04
# webdevops/php-apache:ubuntu-14.04
# webdevops/php-apache:ubuntu-15.04
# webdevops/php-apache:ubuntu-15.10
+# webdevops/php-apache:ubuntu-16.04
# webdevops/php-apache:centos-7
+# webdevops/php-apache:debian-7
+# webdevops/php-apache:debian-8
+# webdevops/php-apache:debian-8-php7
+# webdevops/php-apache:debian-9
#
# Nginx:
+# webdevops/php-nginx:5.6
+# webdevops/php-nginx:7.0
+# webdevops/php-nginx:7.1
# webdevops/php-nginx:ubuntu-12.04
# webdevops/php-nginx:ubuntu-14.04
# webdevops/php-nginx:ubuntu-15.04
# webdevops/php-nginx:ubuntu-15.10
+# webdevops/php-nginx:ubuntu-16.04
# webdevops/php-nginx:centos-7
+# webdevops/php-nginx:debian-7
+# webdevops/php-nginx:debian-8
+# webdevops/php-nginx:debian-8-php7
+# webdevops/php-nginx:debian-9
#
# HHVM:
# webdevops/hhvm-apache
@@ -29,23 +52,19 @@
#
#++++++++++++++++++++++++++++++++++++++
-FROM webdevops/php-apache:ubuntu-14.04
+FROM webdevops/php-apache:ubuntu-16.04
ENV PROVISION_CONTEXT "production"
# Deploy scripts/configurations
COPY etc/ /opt/docker/etc/
-COPY provision/ /opt/docker/provision/
-COPY code/ /application/code/
+COPY app/ /app/
-RUN /opt/docker/bin/control.sh provision.role.startup boilerplate-main \
- && /opt/docker/bin/control.sh provision.role.startup boilerplate-deployment \
- && /opt/docker/bin/control.sh service.enable cron \
- && /opt/docker/bin/control.sh service.enable dnsmasq \
- && /opt/docker/bin/bootstrap.sh
+RUN ln -sf /opt/docker/etc/cron/crontab /etc/cron.d/docker-boilerplate \
+ && chmod 0644 /opt/docker/etc/cron/crontab \
+ && echo >> /opt/docker/etc/cron/crontab \
+ && ln -sf /opt/docker/etc/php/production.ini /opt/docker/etc/php/php.ini
# Configure volume/workdir
-RUN mkdir -p /application/code/
-VOLUME /application/
-WORKDIR /application/code/
\ No newline at end of file
+WORKDIR /app/
diff --git a/Dockerfile.development b/Dockerfile.development
index 634a608..0891744 100644
--- a/Dockerfile.development
+++ b/Dockerfile.development
@@ -1,27 +1,47 @@
#++++++++++++++++++++++++++++++++++++++
-# Application Docker container
+# PHP application Docker container
#++++++++++++++++++++++++++++++++++++++
#
# PHP-Versions:
-# ubuntu-12.04 -> PHP 5.3, LTS (precise)
-# ubuntu-14.04 -> PHP 5.5, LTS (trusty)
-# ubuntu-15.04 -> PHP 5.6 (vivid)
-# ubuntu-15.10 -> PHP 5.6 (wily)
-# centos-7 -> PHP 5.4
+# ubuntu-12.04 -> PHP 5.3 (precise) LTS
+# ubuntu-14.04 -> PHP 5.5 (trusty) LTS
+# ubuntu-15.04 -> PHP 5.6 (vivid)
+# ubuntu-15.10 -> PHP 5.6 (wily)
+# ubuntu-16.04 -> PHP 7.0 (xenial) LTS
+# centos-7 -> PHP 5.4
+# debian-7 -> PHP 5.4 (wheezy)
+# debian-8 -> PHP 5.6 and 7.x (jessie)
+# debian-9 -> PHP 7.0 (stretch)
#
# Apache:
-# webdevops/php-apache:ubuntu-12.04
-# webdevops/php-apache:ubuntu-14.04
-# webdevops/php-apache:ubuntu-15.04
-# webdevops/php-apache:ubuntu-15.10
-# webdevops/php-apache:centos-7
+# webdevops/php-apache-dev:5.6
+# webdevops/php-apache-dev:7.0
+# webdevops/php-apache-dev:7.1
+# webdevops/php-apache-dev:ubuntu-12.04
+# webdevops/php-apache-dev:ubuntu-14.04
+# webdevops/php-apache-dev:ubuntu-15.04
+# webdevops/php-apache-dev:ubuntu-15.10
+# webdevops/php-apache-dev:ubuntu-16.04
+# webdevops/php-apache-dev:centos-7
+# webdevops/php-apache-dev:debian-7
+# webdevops/php-apache-dev:debian-8
+# webdevops/php-apache-dev:debian-8-php7
+# webdevops/php-apache-dev:debian-9
#
# Nginx:
-# webdevops/php-nginx:ubuntu-12.04
-# webdevops/php-nginx:ubuntu-14.04
-# webdevops/php-nginx:ubuntu-15.04
-# webdevops/php-nginx:ubuntu-15.10
-# webdevops/php-nginx:centos-7
+# webdevops/php-nginx-dev:5.6
+# webdevops/php-nginx-dev:7.0
+# webdevops/php-nginx-dev:7.1
+# webdevops/php-nginx-dev:ubuntu-12.04
+# webdevops/php-nginx-dev:ubuntu-14.04
+# webdevops/php-nginx-dev:ubuntu-15.04
+# webdevops/php-nginx-dev:ubuntu-15.10
+# webdevops/php-nginx-dev:ubuntu-16.04
+# webdevops/php-nginx-dev:centos-7
+# webdevops/php-nginx-dev:debian-7
+# webdevops/php-nginx-dev:debian-8
+# webdevops/php-nginx-dev:debian-8-php7
+# webdevops/php-nginx-dev:debian-9
#
# HHVM:
# webdevops/hhvm-apache
@@ -29,22 +49,17 @@
#
#++++++++++++++++++++++++++++++++++++++
-FROM webdevops/php-apache:ubuntu-14.04
+FROM webdevops/php-apache-dev:ubuntu-16.04
ENV PROVISION_CONTEXT "development"
# Deploy scripts/configurations
COPY etc/ /opt/docker/etc/
-COPY provision/ /opt/docker/provision/
-RUN /opt/docker/bin/control.sh provision.role boilerplate-main \
- && /opt/docker/bin/control.sh provision.role boilerplate-main-development \
- && /opt/docker/bin/control.sh provision.role.startup boilerplate-deployment \
- && /opt/docker/bin/control.sh service.enable cron \
- && /opt/docker/bin/control.sh service.enable dnsmasq \
- && /opt/docker/bin/control.sh service.enable postfix \
- && /opt/docker/bin/bootstrap.sh
+RUN ln -sf /opt/docker/etc/cron/crontab /etc/cron.d/docker-boilerplate \
+ && chmod 0644 /opt/docker/etc/cron/crontab \
+ && echo >> /opt/docker/etc/cron/crontab \
+ && ln -sf /opt/docker/etc/php/development.ini /opt/docker/etc/php/php.ini
# Configure volume/workdir
-RUN mkdir -p /application/code/
-WORKDIR /application/code/
\ No newline at end of file
+WORKDIR /app/
diff --git a/Dockerfile.production b/Dockerfile.production
index 034c389..9debefc 100644
--- a/Dockerfile.production
+++ b/Dockerfile.production
@@ -1,27 +1,50 @@
#++++++++++++++++++++++++++++++++++++++
-# Application Docker container
+# PHP application Docker container
#++++++++++++++++++++++++++++++++++++++
#
# PHP-Versions:
-# ubuntu-12.04 -> PHP 5.3, LTS (precise)
-# ubuntu-14.04 -> PHP 5.5, LTS (trusty)
-# ubuntu-15.04 -> PHP 5.6 (vivid)
-# ubuntu-15.10 -> PHP 5.6 (wily)
-# centos-7 -> PHP 5.4
+# 5.6 -> PHP 5.6 official PHP image
+# 7.0 -> PHP 7.0 official PHP image
+# 7.1 -> PHP 7.1 official PHP image
+# ubuntu-12.04 -> PHP 5.3 (precise) LTS
+# ubuntu-14.04 -> PHP 5.5 (trusty) LTS
+# ubuntu-15.04 -> PHP 5.6 (vivid)
+# ubuntu-15.10 -> PHP 5.6 (wily)
+# ubuntu-16.04 -> PHP 7.0 (xenial) LTS
+# centos-7 -> PHP 5.4
+# debian-7 -> PHP 5.4 (wheezy)
+# debian-8 -> PHP 5.6 and 7.x (jessie)
+# debian-9 -> PHP 7.0 (stretch)
#
# Apache:
+# webdevops/php-apache:5.6
+# webdevops/php-apache:7.0
+# webdevops/php-apache:7.1
# webdevops/php-apache:ubuntu-12.04
# webdevops/php-apache:ubuntu-14.04
# webdevops/php-apache:ubuntu-15.04
# webdevops/php-apache:ubuntu-15.10
+# webdevops/php-apache:ubuntu-16.04
# webdevops/php-apache:centos-7
+# webdevops/php-apache:debian-7
+# webdevops/php-apache:debian-8
+# webdevops/php-apache:debian-8-php7
+# webdevops/php-apache:debian-9
#
# Nginx:
+# webdevops/php-nginx:5.6
+# webdevops/php-nginx:7.0
+# webdevops/php-nginx:7.1
# webdevops/php-nginx:ubuntu-12.04
# webdevops/php-nginx:ubuntu-14.04
# webdevops/php-nginx:ubuntu-15.04
# webdevops/php-nginx:ubuntu-15.10
+# webdevops/php-nginx:ubuntu-16.04
# webdevops/php-nginx:centos-7
+# webdevops/php-nginx:debian-7
+# webdevops/php-nginx:debian-8
+# webdevops/php-nginx:debian-8-php7
+# webdevops/php-nginx:debian-9
#
# HHVM:
# webdevops/hhvm-apache
@@ -29,26 +52,17 @@
#
#++++++++++++++++++++++++++++++++++++++
-
-
-FROM webdevops/php-apache:ubuntu-14.04
-FROM webdevops/php-apache:ubuntu-14.04
-FROM webdevops/php-apache:ubuntu-14.04
-FROM webdevops/php-apache:ubuntu-14.04
+FROM webdevops/php-apache:ubuntu-16.04
ENV PROVISION_CONTEXT "production"
# Deploy scripts/configurations
COPY etc/ /opt/docker/etc/
-COPY provision/ /opt/docker/provision/
-RUN /opt/docker/bin/control.sh provision.role boilerplate-main \
- && /opt/docker/bin/control.sh provision.role.startup boilerplate-deployment \
- && /opt/docker/bin/control.sh service.enable cron \
- && /opt/docker/bin/control.sh service.enable dnsmasq \
- && /opt/docker/bin/control.sh service.enable postfix \
- && /opt/docker/bin/bootstrap.sh
+RUN ln -sf /opt/docker/etc/cron/crontab /etc/cron.d/docker-boilerplate \
+ && chmod 0644 /opt/docker/etc/cron/crontab \
+ && echo >> /opt/docker/etc/cron/crontab \
+ && ln -sf /opt/docker/etc/php/production.ini /opt/docker/etc/php/php.ini
# Configure volume/workdir
-RUN mkdir -p /application/code/
-WORKDIR /application/code/
\ No newline at end of file
+WORKDIR /app/
diff --git a/Makefile b/Makefile
index 1a14bb1..a3acca4 100644
--- a/Makefile
+++ b/Makefile
@@ -29,43 +29,30 @@ state:
rebuild:
docker-compose stop
- docker-compose rm --force main web
- docker-compose build --no-cache
-
-#############################
-# Docker cloud
-#############################
-
-cloud-build:
- docker-compose --file docker-compose-cloud.yml build
- docker-compose --file docker-compose-cloud.yml build --no-cache sourcecode
- docker-compose --file docker-compose-cloud.yml stop
- docker-compose --file docker-compose-cloud.yml rm --force sourcecode
- docker-compose --file docker-compose-cloud.yml up -d --force-recreate
+ docker-compose pull
+ docker-compose rm --force app
+ docker-compose build --no-cache --pull
+ docker-compose up -d --force-recreate
#############################
# MySQL
#############################
mysql-backup:
- docker-compose run --rm --no-deps main root bash /docker/bin/backup.sh mysql
+ bash ./bin/backup.sh mysql
mysql-restore:
- docker-compose run --rm --no-deps main root bash /docker/bin/restore.sh mysql
+ bash ./bin/restore.sh mysql
#############################
# Solr
#############################
solr-backup:
- docker-compose stop solr
- docker-compose run --rm --no-deps main root bash /docker/bin/backup.sh solr
- docker-compose start solr
+ bash ./bin/backup.sh solr
solr-restore:
- docker-compose stop solr
- docker-compose run --rm --no-deps main root bash /docker/bin/restore.sh solr
- docker-compose start solr
+ bash ./bin/restore.sh solr
#############################
# General
@@ -77,11 +64,13 @@ restore: mysql-restore solr-restore
build:
bash bin/build.sh
-bash:
- docker-compose run --rm main bash
+bash: shell
+
+shell:
+ docker-compose exec --user application app /bin/bash
root:
- docker-compose run --rm main root
+ docker-compose exec --user root app /bin/bash
#############################
# Argument fix workaround
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
index 73bed7a..d2f07ae
--- a/README.md
+++ b/README.md
@@ -1,9 +1,7 @@
-# Dockerized PHP web project boilerplate
+
-[](https://github.com/webdevops/php-docker-boilerplate/releases/tag/4.0.0)
+[](https://github.com/webdevops/php-docker-boilerplate/releases/tag/5.2.0-beta3)

-[](http://isitmaintained.com/project/mblaschke/php-docker-boilerplate "Average time to resolve an issue")
-[](http://isitmaintained.com/project/mblaschke/php-docker-boilerplate "Percentage of issues still open")
This is an easy customizable docker boilerplate for any PHP-based projects like _Symfony Framework_, _CakePHP_, _Yii_ and many other frameworks or applications.
@@ -19,6 +17,7 @@ Supports:
- Memcached (disabled)
- Mailcatcher (if no mail sandbox is used, eg. [Vagrant Development VM](https://github.com/mblaschke/vagrant-development))
- FTP server (vsftpd)
+- PhpMyAdmin
- maybe more later...
This Docker boilerplate is based on the [Docker best practices](https://docs.docker.com/articles/dockerfile_best-practices/) and doesn't use too much magic. Configuration of each docker container is available in the `docker/` directory - feel free to customize.
diff --git a/code/.gitkeep b/app/.gitkeep
similarity index 100%
rename from code/.gitkeep
rename to app/.gitkeep
diff --git a/app/index.php b/app/index.php
new file mode 100644
index 0000000..83f1549
--- /dev/null
+++ b/app/index.php
@@ -0,0 +1,3 @@
+ /dev/null || echo "")"
+}
+
+dockerExec() {
+ docker exec -i "$(docker-compose ps -q app)" "$@"
+}
+
+dockerExecMySQL() {
+ docker exec -i "$(docker-compose ps -q mysql)" "$@"
+}
+
+dockerCopyFrom() {
+ PATH_DOCKER="$1"
+ PATH_HOST="$2"
+ docker cp "$(docker-compose ps -q app):${PATH_DOCKER}" "${PATH_HOST}"
+}
+dockerCopyTo() {
+ PATH_HOST="$1"
+ PATH_DOCKER="$2"
+ docker cp "${PATH_HOST}" "$(docker-compose ps -q app):${PATH_DOCKER}"
+}
diff --git a/bin/backup.sh b/bin/backup.sh
index 7b104e4..002f857 100755
--- a/bin/backup.sh
+++ b/bin/backup.sh
@@ -19,25 +19,39 @@ case "$1" in
## MySQL
###################################
"mysql")
- if [ -f "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" ]; then
- logMsg "Removing old backup file..."
- rm -f -- "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}"
+ if [[ -n "$(dockerContainerId mysql)" ]]; then
+ if [ -f "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" ]; then
+ logMsg "Removing old backup file..."
+ rm -f -- "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}"
+ fi
+
+ logMsg "Starting MySQL backup..."
+ MYSQL_ROOT_PASSWORD=$(dockerExecMySQL printenv MYSQL_ROOT_PASSWORD)
+ dockerExecMySQL sh -c "MYSQL_PWD=\"${MYSQL_ROOT_PASSWORD}\" mysqldump -h mysql -uroot --opt --single-transaction --events --all-databases --routines --comments" | bzip2 > "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}"
+ logMsg "Finished"
+ else
+ echo " * Skipping mysql backup, no such container"
fi
-
- logMsg "Starting MySQL backup..."
- mysqldump --opt --single-transaction --events --all-databases --routines --comments | bzip2 > "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}"
;;
###################################
## Solr
###################################
"solr")
- if [ -f "${BACKUP_DIR}/${BACKUP_SOLR_FILE}" ]; then
- logMsg "Removing old backup file..."
- rm -f -- "${BACKUP_DIR}/${BACKUP_SOLR_FILE}"
+ if [[ -n "$(dockerContainerId solr)" ]]; then
+ logMsg "Starting Solr backup..."
+ docker-compose stop solr
+
+ if [ -f "${BACKUP_DIR}/${BACKUP_SOLR_FILE}" ]; then
+ logMsg "Removing old backup file..."
+ rm -f -- "${BACKUP_DIR}/${BACKUP_SOLR_FILE}"
+ fi
+ dockerExec tar -cP --to-stdout /storage/solr/ | bzip2 > "${BACKUP_DIR}/${BACKUP_SOLR_FILE}"
+
+ docker-compose start solr
+ logMsg "Finished"
+ else
+ echo " * Skipping solr backup, no such container"
fi
-
- logMsg "Starting Solr backup..."
- tar jcPf "${BACKUP_DIR}/${BACKUP_SOLR_FILE}" /data/solr/
;;
esac
diff --git a/bin/build.sh b/bin/build.sh
index 0e7c7bf..9992a7e 100755
--- a/bin/build.sh
+++ b/bin/build.sh
@@ -20,7 +20,7 @@ sectionHeader "Checking for composer.json ..."
find "$CODE_DIR" -type f -name 'composer.json' | excludeFilter | while read FILE; do
COMPOSER_JSON_DIR=$(dirname $($READLINK -f "$FILE"))
- execInDir "$COMPOSER_JSON_DIR" "composer install --no-dev --no-interaction"
+ execInDir "$COMPOSER_JSON_DIR" "docker run --rm --env COMPOSER_CACHE_DIR=/tmp --user $(id -u):$(id -g) -v \$(pwd):/app composer/composer:alpine install --no-dev --no-interaction"
done
diff --git a/bin/create-project.sh b/bin/create-project.sh
index e350975..43e4194 100755
--- a/bin/create-project.sh
+++ b/bin/create-project.sh
@@ -8,10 +8,13 @@ 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 symfony or git)"
exit 1
fi
+#if app dir exists then backup it with timestamp
+[ ! -d "$CODE_DIR" ] || mv "$CODE_DIR" "$CODE_DIR".$(date +%Y%m%d%H%M%S);
+
mkdir -p -- "$CODE_DIR/"
chmod 777 "$CODE_DIR/"
@@ -22,9 +25,13 @@ case "$1" in
## 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
+ if command -v symfony >/dev/null 2>&1; then
+ execInDir "$CODE_DIR" "symfony new '$CODE_DIR'"
+ else
+ wget https://get.symfony.com/cli/installer -O - | bash
+ export PATH="$HOME/.symfony/bin:$PATH"
+ execInDir "$CODE_DIR" "symfony new '$CODE_DIR'"
+ fi
;;
###################################
@@ -39,4 +46,4 @@ case "$1" in
;;
esac
-touch -- "$CODE_DIR/.gitkeep"
\ No newline at end of file
+touch -- "$CODE_DIR/.gitkeep"
diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh
deleted file mode 100755
index 43ef07d..0000000
--- a/bin/entrypoint.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-trap 'echo sigterm ; exit' SIGTERM
-trap 'echo sigkill ; exit' SIGKILL
-
-# Fix code rights
-chown -R "$EFFECTIVE_UID":"$EFFECTIVE_GID" /docker/code/
-
-#############################
-## COMMAND
-#############################
-
-if [ "$1" = 'noop' ]; then
- while true; do
- sleep 1
- done
-fi
-
-exec "$@"
diff --git a/bin/restore.sh b/bin/restore.sh
index ef1feb5..3d581c8 100755
--- a/bin/restore.sh
+++ b/bin/restore.sh
@@ -19,12 +19,19 @@ case "$1" in
## MySQL
###################################
"mysql")
- if [ -f "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" ]; then
- logMsg "Starting MySQL restore..."
- bzcat "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" | mysql
+ if [[ -n "$(dockerContainerId mysql)" ]]; then
+ if [ -f "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" ]; then
+ logMsg "Starting MySQL restore..."
+ MYSQL_ROOT_PASSWORD=$(dockerExecMySQL printenv MYSQL_ROOT_PASSWORD)
+ bzcat "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" | dockerExecMySQL sh -c "MYSQL_PWD=\"${MYSQL_ROOT_PASSWORD}\" mysql -h mysql -uroot"
+ echo "FLUSH PRIVILEGES;" | dockerExecMySQL sh -c "MYSQL_PWD=\"${MYSQL_ROOT_PASSWORD}\" mysql -h mysql -uroot"
+ logMsg "Finished"
+ else
+ errorMsg "MySQL backup file not found"
+ exit 1
+ fi
else
- errorMsg "MySQL backup file not found"
- exit 1
+ echo " * Skipping mysql restore, no such container"
fi
;;
@@ -32,14 +39,25 @@ case "$1" in
## Solr
###################################
"solr")
- if [ -f "${BACKUP_DIR}/${BACKUP_SOLR_FILE}" ]; then
- logMsg "Starting Solr restore..."
- rm -rf /data/solr/* && mkdir -p /data/solr/
- chmod 777 /data/solr/
- tar jxPf "${BACKUP_DIR}/${BACKUP_SOLR_FILE}" -C /
+ if [[ -n "$(dockerContainerId solr)" ]]; then
+ if [ -f "${BACKUP_DIR}/${BACKUP_SOLR_FILE}" ]; then
+ logMsg "Starting Solr restore..."
+ docker-compose stop solr
+
+ dockerExec rm -rf /storage/solr/
+ dockerExec mkdir -p /storage/solr/
+ dockerExec chmod 777 /storage/solr/
+ dockerCopyTo "${BACKUP_DIR}/${BACKUP_SOLR_FILE}" "/tmp/solr-restore.tbz2"
+ dockerExec tar -jxPf "/tmp/solr-restore.tbz2" -C /
+
+ docker-compose start solr
+ logMsg "Finished"
+ else
+ errorMsg "Solr backup file not found"
+ exit 1
+ fi
else
- errorMsg "Solr backup file not found"
- exit 1
+ echo " * Skipping solr restore, no such container"
fi
;;
esac
diff --git a/docker-compose.cloud.yml b/docker-compose.cloud.yml
index 7e940bb..d01ef63 100644
--- a/docker-compose.cloud.yml
+++ b/docker-compose.cloud.yml
@@ -1,141 +1,141 @@
-#######################################
-# Main php container
-#######################################
-main:
- build: .
- dockerfile: Dockerfile.cloud
- links:
- - mysql
- #- postgres
- #- mail
- #- solr
- #- elasticsearch
- #- redis
- #- memcached
- #- ftp
- ports:
- - "8000:80"
- - "8443:443"
- - "10022:22"
- volumes_from:
- - sourcecode
- - storage
- env_file:
- - docker-environment.yml
- - docker-environment.production.yml
+version: '2'
+services:
+ #######################################
+ # PHP application Docker container
+ #
+ # for this container you have to remove
+ # following entries from .dockerignore:
+ #
+ # etc/*
+ # provision/*
+ # app/*
+ #
+ #######################################
+ app:
+ build:
+ context: .
+ dockerfile: Dockerfile.cloud
+ links:
+ - mysql
+ #- postgres
+ #- mail
+ #- solr
+ #- elasticsearch
+ #- redis
+ #- memcached
+ #- ftp
+ ports:
+ - "8000:80"
+ - "8443:443"
+ - "10022:22"
+ volumes_from:
+ - storage
+ env_file:
+ - etc/environment.yml
+ - etc/environment.production.yml
-#######################################
-# MySQL server
-#######################################
-mysql:
- build: docker/mysql
- dockerfile: MySQL-5.5
- #dockerfile: MySQL-5.6
- #dockerfile: MySQL-5.7
- #dockerfile: MariaDB-5.5
- #dockerfile: MariaDB-10
- #dockerfile: Percona-5.5
- #dockerfile: Percona-5.6
- volumes_from:
- - storage
- env_file:
- - docker-environment.yml
- - docker-environment.production.yml
+ #######################################
+ # MySQL server
+ #######################################
+ mysql:
+ build:
+ context: docker/mysql/
+ #dockerfile: MySQL-5.5.Dockerfile
+ dockerfile: MySQL-5.6.Dockerfile
+ #dockerfile: MySQL-5.7.Dockerfile
+ #dockerfile: MariaDB-5.5.Dockerfile
+ #dockerfile: MariaDB-10.Dockerfile
+ #dockerfile: Percona-5.5.Dockerfile
+ #dockerfile: Percona-5.6.Dockerfile
+ #dockerfile: Percona-5.7.Dockerfile
+ volumes_from:
+ - storage
+ env_file:
+ - etc/environment.yml
+ - etc/environment.production.yml
-#######################################
-# PostgreSQL server
-#######################################
-#postgres:
-# build: docker/postgres/
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # PostgreSQL server
+ #######################################
+ #postgres:
+ # build:
+ # context: docker/postgres/
+ # dockerfile: Postgres-9.4.Dockerfile
+ # dockerfile: Postgres-9.5.Dockerfile
+ # volumes_from:
+ # - storage
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# Solr server
-#######################################
-#solr:
-# build: docker/solr/
-# volumes_from:
-# - storage
-# environment:
-# - SOLR_STORAGE=/data/solr/server-master/
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # Solr server
+ #######################################
+ #solr:
+ # build:
+ # context: docker/solr/
+ # volumes_from:
+ # - storage
+ # environment:
+ # - SOLR_STORAGE=/storage/solr/server-master/
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# Elasticsearch
-#######################################
-#elasticsearch:
-# build: docker/elasticsearch/
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # Elasticsearch
+ #######################################
+ #elasticsearch:
+ # build:
+ # context: docker/elasticsearch/
+ # volumes_from:
+ # - storage
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# Redis
-#######################################
-#redis:
-# build: docker/redis/
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # Redis
+ #######################################
+ #redis:
+ # build:
+ # context: docker/redis/
+ # volumes_from:
+ # - storage
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# Memcached
-#######################################
-#memcached:
-# build: docker/memcached/
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # Memcached
+ #######################################
+ #memcached:
+ # build:
+ # context: docker/memcached/
+ # volumes_from:
+ # - storage
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# Mailcatcher
-#######################################
-#mail:
-# build: docker/mail/
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # FTP (vsftpd)
+ #######################################
+ #ftp:
+ # build:
+ # context: docker/vsftpd/
+ # volumes_from:
+ # - sourcecode
+ # - storage
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# FTP (vsftpd)
-#######################################
-#ftp:
-# build: docker/vsftpd/
-# volumes_from:
-# - sourcecode
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
-
-#######################################
-# sourcecode
-#######################################
-sourcecode:
- build: .
- dockerfile: Dockerfile-Source
- volumes:
- - /docker/code/
- env_file:
- - docker-environment.yml
- - docker-environment.production.yml
-
-#######################################
-# Storage
-#######################################
-storage:
- build: docker/storage/
- volumes:
- - /data
+ #######################################
+ # Storage
+ #######################################
+ storage:
+ build:
+ context: docker/storage/
+ volumes:
+ - /storage
diff --git a/docker-compose.development-reverse-proxy.yml b/docker-compose.development-reverse-proxy.yml
new file mode 100755
index 0000000..6ca77b8
--- /dev/null
+++ b/docker-compose.development-reverse-proxy.yml
@@ -0,0 +1,192 @@
+version: '2'
+services:
+ #######################################
+ # PHP application Docker container
+ #######################################
+ app:
+ build:
+ context: .
+ dockerfile: Dockerfile.development
+ links:
+ - mail
+ - mysql
+ #- postgres
+ #- solr
+ #- elasticsearch
+ #- redis
+ #- memcached
+ #- ftp
+ #ports:
+ # - "8000:80"
+ # - "8443:443"
+ # - "10022:22"
+ volumes:
+ - ./app/:/app/
+ - ./:/docker/
+ # cap and privileged needed for slowlog
+ cap_add:
+ - SYS_PTRACE
+ privileged: true
+ env_file:
+ - etc/environment.yml
+ - etc/environment.development.yml
+ environment:
+ - VIRTUAL_HOST=.app.boilerplate.docker
+ - VIRTUAL_PORT=80
+ - POSTFIX_RELAYHOST=[mail]:1025
+
+
+ #######################################
+ # MySQL server
+ #######################################
+ mysql:
+ build:
+ context: docker/mysql/
+ #dockerfile: MySQL-5.5.Dockerfile
+ dockerfile: MySQL-5.6.Dockerfile
+ #dockerfile: MySQL-5.7.Dockerfile
+ #dockerfile: MariaDB-5.5.Dockerfile
+ #dockerfile: MariaDB-10.Dockerfile
+ #dockerfile: Percona-5.5.Dockerfile
+ #dockerfile: Percona-5.6.Dockerfile
+ #dockerfile: Percona-5.7.Dockerfile
+ #ports:
+ # - 13306:3306
+ volumes:
+ - mysql:/var/lib/mysql
+ env_file:
+ - etc/environment.yml
+ - etc/environment.development.yml
+
+ #######################################
+ # PostgreSQL server
+ #######################################
+ #postgres:
+ # build:
+ # context: docker/postgres/
+ # dockerfile: Postgres-9.4.Dockerfile
+ # dockerfile: Postgres-9.5.Dockerfile
+ # ports:
+ # - 15432:5432
+ # volumes:
+ # - postgres:/var/lib/postgresql/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
+
+ #######################################
+ # Solr server
+ #######################################
+ #solr:
+ # build:
+ # context: docker/solr/
+ # volumes:
+ # - solr:/opt/solr/server/solr/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
+ # environment:
+ # - SOLR_STORAGE=/opt/solr/server/solr/data
+ # - VIRTUAL_HOST=solr.boilerplate.docker
+ # - VIRTUAL_PORT=8983
+
+ #######################################
+ # Elasticsearch
+ #######################################
+ #elasticsearch:
+ # build:
+ # context: docker/elasticsearch/
+ # ports:
+ # - 19200:9200
+ # - 19300:9300
+ # volumes:
+ # - elasticsearch:/usr/share/elasticsearch/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
+ # environment:
+ # - VIRTUAL_HOST=elasticsearch.boilerplate.docker
+ # - VIRTUAL_PORT=9200
+
+ #######################################
+ # Redis
+ #######################################
+ #redis:
+ # build:
+ # context: docker/redis/
+ # volumes:
+ # - redis:/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
+
+ #######################################
+ # Memcached
+ #######################################
+ #memcached:
+ # build:
+ # context: docker/memcached/
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
+
+ #######################################
+ # Mail
+ #######################################
+ # Mailhog
+ mail:
+ image: mailhog/mailhog
+ # ports:
+ # - 8025:8025
+ environment:
+ - VIRTUAL_HOST=mail.boilerplate.docker
+ - VIRTUAL_PORT=8025
+
+ # Mailcatcher
+ #mail:
+ # image: schickling/mailcatcher
+ # environment:
+ # - VIRTUAL_HOST=mail.boilerplate.docker
+ # - VIRTUAL_PORT=1080
+
+
+ # Mailsandbox
+ #mail:
+ # image: webdevops/mail-sandbox
+ # environment:
+ # - VIRTUAL_HOST=mail.boilerplate.docker
+ # - VIRTUAL_PORT=80
+
+ #######################################
+ # FTP (vsftpd)
+ #######################################
+ #ftp:
+ # build:
+ # context: docker/vsftpd/
+ # volumes:
+ # - ./:/application/
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
+
+ #######################################
+ # phpMyAdmin
+ #######################################
+ #phpmyadmin:
+ # image: phpmyadmin/phpmyadmin
+ # links:
+ # - mysql
+ # environment:
+ # - PMA_HOSTS=mysql
+ # - VIRTUAL_HOST=pma.boilerplate.docker
+ # - VIRTUAL_PORT=80
+ # volumes:
+ # - phpmyadmin:/sessions
+
+volumes:
+ mysql:
+ postgres:
+ solr:
+ elasticsearch:
+ redis:
+ phpmyadmin:
diff --git a/docker-compose.development.yml b/docker-compose.development.yml
old mode 100644
new mode 100755
index 1659e17..9978c35
--- a/docker-compose.development.yml
+++ b/docker-compose.development.yml
@@ -1,150 +1,201 @@
-#######################################
-# Main php container
-#######################################
-main:
- build: .
- dockerfile: Dockerfile.development
- links:
- - mysql
- #- postgres
- #- mail
- #- solr
- #- elasticsearch
- #- redis
- #- memcached
- #- ftp
- ports:
- - "8000:80"
- - "8443:443"
- - "10022:22"
- volumes:
- - ./:/application/
- - /tmp/debug/:/tmp/debug/
- volumes_from:
- - storage
- # cap and privileged needed for slowlog
- cap_add:
- - SYS_PTRACE
- privileged: true
- env_file:
- - docker-environment.yml
- - docker-environment.development.yml
+version: '2'
+services:
+ #######################################
+ # PHP application Docker container
+ #######################################
+ app:
+ build:
+ context: .
+ dockerfile: Dockerfile.development
+ links:
+ - mail
+ - mysql
+ #- postgres
+ #- solr
+ #- elasticsearch
+ #- redis
+ #- memcached
+ #- ftp
+ ports:
+ - "8000:80"
+ - "8443:443"
+ - "10022:22"
+ volumes:
+ - ./app/:/app/
+ - ./:/docker/
+ # cap and privileged needed for slowlog
+ cap_add:
+ - SYS_PTRACE
+ privileged: true
+ env_file:
+ - etc/environment.yml
+ - etc/environment.development.yml
+ environment:
+ - VIRTUAL_HOST=.app.boilerplate.docker
+ - VIRTUAL_PORT=80
+ - POSTFIX_RELAYHOST=[mail]:1025
-#######################################
-# MySQL server
-#######################################
-mysql:
- build: docker/mysql
- dockerfile: MySQL-5.5
- #dockerfile: MySQL-5.6
- #dockerfile: MySQL-5.7
- #dockerfile: MariaDB-5.5
- #dockerfile: MariaDB-10
- #dockerfile: Percona-5.5
- #dockerfile: Percona-5.6
- ports:
- - 13306:3306
- volumes_from:
- - storage
- volumes:
- - /tmp/debug/:/tmp/debug/
- env_file:
- - docker-environment.yml
- - docker-environment.development.yml
-#######################################
-# PostgreSQL server
-#######################################
-#postgres:
-# build: docker/postgres/
-# ports:
-# - 15432:5432
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.development.yml
+ #######################################
+ # MySQL server
+ #######################################
+ mysql:
+ build:
+ context: docker/mysql/
+ #dockerfile: MySQL-5.5.Dockerfile
+ dockerfile: MySQL-5.6.Dockerfile
+ #dockerfile: MySQL-5.7.Dockerfile
+ #dockerfile: MariaDB-5.5.Dockerfile
+ #dockerfile: MariaDB-10.Dockerfile
+ #dockerfile: Percona-5.5.Dockerfile
+ #dockerfile: Percona-5.6.Dockerfile
+ #dockerfile: Percona-5.7.Dockerfile
+ ports:
+ - 13306:3306
+ volumes:
+ - mysql:/var/lib/mysql
+ env_file:
+ - etc/environment.yml
+ - etc/environment.development.yml
-#######################################
-# Solr server
-#######################################
-#solr:
-# build: docker/solr/
-# ports:
-# - 18983:8983
-# volumes_from:
-# - storage
-# environment:
-# - SOLR_STORAGE=/data/solr/server-master/
-# env_file:
-# - docker-environment.yml
-# - docker-environment.development.yml
+ #######################################
+ # PostgreSQL server
+ #######################################
+ #postgres:
+ # build:
+ # context: docker/postgres/
+ # dockerfile: Postgres-9.4.Dockerfile
+ # dockerfile: Postgres-9.5.Dockerfile
+ # ports:
+ # - 15432:5432
+ # volumes:
+ # - postgres:/var/lib/postgresql/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
-#######################################
-# Elasticsearch
-#######################################
-#elasticsearch:
-# build: docker/elasticsearch/
-# ports:
-# - 19200:9200
-# - 19300:9300
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.development.yml
+ #######################################
+ # Solr server
+ #######################################
+ #solr:
+ # build:
+ # context: docker/solr/
+ # volumes:
+ # - solr:/opt/solr/server/solr/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
+ # environment:
+ # - SOLR_STORAGE=/opt/solr/server/solr/data
+ # - VIRTUAL_HOST=solr.boilerplate.docker
+ # - VIRTUAL_PORT=8983
-#######################################
-# Redis
-#######################################
-#redis:
-# build: docker/redis/
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.development.yml
+ #######################################
+ # Tika server
+ #######################################
+ #tika:
+ # build:
+ # context: docker/tika/
+ # ports:
+ # - 19998:9998
-#######################################
-# Memcached
-#######################################
-#memcached:
-# build: docker/memcached/
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.development.yml
+ #######################################
+ # Elasticsearch
+ #######################################
+ #elasticsearch:
+ # build:
+ # context: docker/elasticsearch/
+ # ports:
+ # - 19200:9200
+ # - 19300:9300
+ # volumes:
+ # - elasticsearch:/usr/share/elasticsearch/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
+ # environment:
+ # - VIRTUAL_HOST=elasticsearch.boilerplate.docker
+ # - VIRTUAL_PORT=9200
-#######################################
-# Mailcatcher
-#######################################
-#mail:
-# build: docker/mail/
-# ports:
-# - 1080:1080
-# env_file:
-# - docker-environment.yml
-# - docker-environment.development.yml
+ #######################################
+ # Redis
+ #######################################
+ #redis:
+ # build:
+ # context: docker/redis/
+ # volumes:
+ # - redis:/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
-#######################################
-# FTP (vsftpd)
-#######################################
-#ftp:
-# build: docker/vsftpd/
-# volumes_from:
-# - storage
-# volumes:
-# - ./:/docker/
-# - /tmp/debug/:/tmp/debug/
-# env_file:
-# - docker-environment.yml
-# - docker-environment.development.yml
+ #######################################
+ # Memcached
+ #######################################
+ #memcached:
+ # build:
+ # context: docker/memcached/
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
-#######################################
-# Storage
-#######################################
-storage:
- build: docker/storage/
- volumes:
- - /data
+ #######################################
+ # Mail
+ #######################################
+ # Mailhog
+ mail:
+ image: mailhog/mailhog
+ # ports:
+ # - 8025:8025
+ environment:
+ - VIRTUAL_HOST=mail.boilerplate.docker
+ - VIRTUAL_PORT=8025
+
+ # Mailcatcher
+ #mail:
+ # image: schickling/mailcatcher
+ # environment:
+ # - VIRTUAL_HOST=mail.boilerplate.docker
+ # - VIRTUAL_PORT=1080
+
+
+ # Mailsandbox
+ #mail:
+ # image: webdevops/mail-sandbox
+ # environment:
+ # - VIRTUAL_HOST=mail.boilerplate.docker
+ # - VIRTUAL_PORT=80
+
+ #######################################
+ # FTP (vsftpd)
+ #######################################
+ #ftp:
+ # build:
+ # context: docker/vsftpd/
+ # volumes:
+ # - ./:/application/
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.development.yml
+
+ #######################################
+ # phpMyAdmin
+ #######################################
+ #phpmyadmin:
+ # image: phpmyadmin/phpmyadmin
+ # links:
+ # - mysql
+ # environment:
+ # - PMA_HOSTS=mysql
+ # - VIRTUAL_HOST=pma.boilerplate.docker
+ # - VIRTUAL_PORT=80
+ # volumes:
+ # - phpmyadmin:/sessions
+
+volumes:
+ mysql:
+ postgres:
+ solr:
+ elasticsearch:
+ redis:
+ phpmyadmin:
diff --git a/docker-compose.production.yml b/docker-compose.production.yml
index 2b8b000..caedb3f 100644
--- a/docker-compose.production.yml
+++ b/docker-compose.production.yml
@@ -1,143 +1,136 @@
-#######################################
-# Main php container
-#######################################
-main:
- build: .
- dockerfile: Dockerfile.production
- links:
- - mysql
- #- postgres
- #- mail
- #- solr
- #- elasticsearch
- #- redis
- #- memcached
- #- ftp
- ports:
- - "8000:80"
- - "8443:443"
- - "10022:22"
- volumes:
- - ./:/application/
- volumes_from:
- - storage
- env_file:
- - docker-environment.yml
- - docker-environment.production.yml
+version: '2'
+services:
+ #######################################
+ # PHP application Docker container
+ #######################################
+ app:
+ build:
+ context: .
+ dockerfile: Dockerfile.production
+ links:
+ - mysql
+ #- postgres
+ #- mail
+ #- solr
+ #- elasticsearch
+ #- redis
+ #- memcached
+ #- ftp
+ ports:
+ - "8000:80"
+ - "8443:443"
+ - "10022:22"
+ volumes:
+ - ./app/:/app/
+ env_file:
+ - etc/environment.yml
+ - etc/environment.production.yml
-#######################################
-# MySQL server
-#######################################
-mysql:
- build: docker/mysql
- dockerfile: MySQL-5.5
- #dockerfile: MySQL-5.6
- #dockerfile: MySQL-5.7
- #dockerfile: MariaDB-5.5
- #dockerfile: MariaDB-10
- #dockerfile: Percona-5.5
- #dockerfile: Percona-5.6
- volumes_from:
- - storage
- volumes:
- - /tmp/debug/:/tmp/debug/
- env_file:
- - docker-environment.yml
- - docker-environment.production.yml
+ #######################################
+ # MySQL server
+ #######################################
+ mysql:
+ build:
+ context: docker/mysql/
+ #dockerfile: MySQL-5.5.Dockerfile
+ dockerfile: MySQL-5.6.Dockerfile
+ #dockerfile: MySQL-5.7.Dockerfile
+ #dockerfile: MariaDB-5.5.Dockerfile
+ #dockerfile: MariaDB-10.Dockerfile
+ #dockerfile: Percona-5.5.Dockerfile
+ #dockerfile: Percona-5.6.Dockerfile
+ #dockerfile: Percona-5.7.Dockerfile
+ volumes:
+ - mysql:/var/lib/mysql
+ env_file:
+ - etc/environment.yml
+ - etc/environment.production.yml
-#######################################
-# PostgreSQL server
-#######################################
-#postgres:
-# build: docker/postgres/
-# ports:
-# - 15432:5432
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # PostgreSQL server
+ #######################################
+ #postgres:
+ # build:
+ # context: docker/postgres/
+ # dockerfile: Postgres-9.4.Dockerfile
+ # dockerfile: Postgres-9.5.Dockerfile
+ # ports:
+ # - 15432:5432
+ # volumes:
+ # - solr:/opt/solr/server/solr/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# Solr server
-#######################################
-#solr:
-# build: docker/solr/
-# ports:
-# - 18983:8983
-# volumes_from:
-# - storage
-# environment:
-# - SOLR_STORAGE=/data/solr/server-master/
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # Solr server
+ #######################################
+ #solr:
+ # build:
+ # context: docker/solr/
+ # ports:
+ # - 18983:8983
+ # volumes:
+ # - solr:/opt/solr/server/solr/data
+ # environment:
+ # - SOLR_STORAGE=/opt/solr/server/solr/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# Elasticsearch
-#######################################
-#elasticsearch:
-# build: docker/elasticsearch/
-# ports:
-# - 19200:9200
-# - 19300:9300
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # Elasticsearch
+ #######################################
+ #elasticsearch:
+ # build:
+ # context: docker/elasticsearch/
+ # ports:
+ # - 19200:9200
+ # - 19300:9300
+ # volumes:
+ # - elasticsearch:/usr/share/elasticsearch/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# Redis
-#######################################
-#redis:
-# build: docker/redis/
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # Redis
+ #######################################
+ #redis:
+ # build:
+ # context: docker/redis/
+ # volumes:
+ # - redis:/data
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# Memcached
-#######################################
-#memcached:
-# build: docker/memcached/
-# volumes_from:
-# - storage
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # Memcached
+ #######################################
+ #memcached:
+ # build:
+ # context: docker/memcached/
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# Mailcatcher
-#######################################
-#mail:
-# build: docker/mail/
-# ports:
-# - 1080:1080
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
+ #######################################
+ # FTP (vsftpd)
+ #######################################
+ #ftp:
+ # build:
+ # context: docker/vsftpd/
+ # volumes:
+ # - ./:/application/
+ # env_file:
+ # - etc/environment.yml
+ # - etc/environment.production.yml
-#######################################
-# FTP (vsftpd)
-#######################################
-#ftp:
-# build: docker/vsftpd/
-# volumes_from:
-# - storage
-# volumes:
-# - ./:/docker/
-# - /tmp/debug/:/tmp/debug/
-# env_file:
-# - docker-environment.yml
-# - docker-environment.production.yml
-
-#######################################
-# Storage
-#######################################
-storage:
- build: docker/storage/
- volumes:
- - /data
+volumes:
+ mysql:
+ postgres:
+ solr:
+ elasticsearch:
+ redis:
+ phpmyadmin:
diff --git a/docker/mail/Dockerfile b/docker/mail/Dockerfile
deleted file mode 100644
index 7ad1c26..0000000
--- a/docker/mail/Dockerfile
+++ /dev/null
@@ -1,12 +0,0 @@
-#++++++++++++++++++++++++++++++++++++++
-# Mailcatcher Docker container
-#++++++++++++++++++++++++++++++++++++++
-#
-# Images:
-#
-# schickling/mailcatcher
-# https://hub.docker.com/r/schickling/mailcatcher/
-#
-#++++++++++++++++++++++++++++++++++++++
-
-FROM schickling/mailcatcher
diff --git a/docker/mysql/MariaDB-10 b/docker/mysql/MariaDB-10.Dockerfile
similarity index 77%
rename from docker/mysql/MariaDB-10
rename to docker/mysql/MariaDB-10.Dockerfile
index 04acf07..d2bd3a0 100644
--- a/docker/mysql/MariaDB-10
+++ b/docker/mysql/MariaDB-10.Dockerfile
@@ -12,3 +12,5 @@
FROM mariadb:10
ADD conf/mysql-docker.cnf /etc/mysql/conf.d/z99-docker.cnf
+RUN chown mysql:mysql /etc/mysql/conf.d/z99-docker.cnf \
+ && chmod 0644 /etc/mysql/conf.d/z99-docker.cnf
diff --git a/docker/mysql/MariaDB-5.5 b/docker/mysql/MariaDB-5.5.Dockerfile
similarity index 77%
rename from docker/mysql/MariaDB-5.5
rename to docker/mysql/MariaDB-5.5.Dockerfile
index 1faba2d..46a979e 100644
--- a/docker/mysql/MariaDB-5.5
+++ b/docker/mysql/MariaDB-5.5.Dockerfile
@@ -12,3 +12,5 @@
FROM mariadb:5.5
ADD conf/mysql-docker.cnf /etc/mysql/conf.d/z99-docker.cnf
+RUN chown mysql:mysql /etc/mysql/conf.d/z99-docker.cnf \
+ && chmod 0644 /etc/mysql/conf.d/z99-docker.cnf
diff --git a/docker/mysql/MySQL-5.5 b/docker/mysql/MySQL-5.5.Dockerfile
similarity index 75%
rename from docker/mysql/MySQL-5.5
rename to docker/mysql/MySQL-5.5.Dockerfile
index 51e255b..0352d0a 100644
--- a/docker/mysql/MySQL-5.5
+++ b/docker/mysql/MySQL-5.5.Dockerfile
@@ -12,3 +12,5 @@
FROM mysql:5.5
ADD conf/mysql-docker.cnf /etc/mysql/conf.d/z99-docker.cnf
+RUN chown mysql:mysql /etc/mysql/conf.d/z99-docker.cnf \
+ && chmod 0644 /etc/mysql/conf.d/z99-docker.cnf
diff --git a/docker/mysql/MySQL-5.6 b/docker/mysql/MySQL-5.6.Dockerfile
similarity index 75%
rename from docker/mysql/MySQL-5.6
rename to docker/mysql/MySQL-5.6.Dockerfile
index 070ab11..d52d9d2 100644
--- a/docker/mysql/MySQL-5.6
+++ b/docker/mysql/MySQL-5.6.Dockerfile
@@ -12,3 +12,5 @@
FROM mysql:5.6
ADD conf/mysql-docker.cnf /etc/mysql/conf.d/z99-docker.cnf
+RUN chown mysql:mysql /etc/mysql/conf.d/z99-docker.cnf \
+ && chmod 0644 /etc/mysql/conf.d/z99-docker.cnf
diff --git a/docker/mysql/MySQL-5.7 b/docker/mysql/MySQL-5.7.Dockerfile
similarity index 75%
rename from docker/mysql/MySQL-5.7
rename to docker/mysql/MySQL-5.7.Dockerfile
index 9e71576..adaf9d8 100644
--- a/docker/mysql/MySQL-5.7
+++ b/docker/mysql/MySQL-5.7.Dockerfile
@@ -12,3 +12,5 @@
FROM mysql:5.7
ADD conf/mysql-docker.cnf /etc/mysql/conf.d/z99-docker.cnf
+RUN chown mysql:mysql /etc/mysql/conf.d/z99-docker.cnf \
+ && chmod 0644 /etc/mysql/conf.d/z99-docker.cnf
diff --git a/docker/mysql/Percona-5.5 b/docker/mysql/Percona-5.5.Dockerfile
similarity index 76%
rename from docker/mysql/Percona-5.5
rename to docker/mysql/Percona-5.5.Dockerfile
index fd8585a..21f426c 100644
--- a/docker/mysql/Percona-5.5
+++ b/docker/mysql/Percona-5.5.Dockerfile
@@ -12,3 +12,5 @@
FROM percona:5.5
ADD conf/mysql-docker.cnf /etc/mysql/conf.d/z99-docker.cnf
+RUN chown mysql:mysql /etc/mysql/conf.d/z99-docker.cnf \
+ && chmod 0644 /etc/mysql/conf.d/z99-docker.cnf
diff --git a/docker/mysql/Percona-5.6 b/docker/mysql/Percona-5.6.Dockerfile
similarity index 76%
rename from docker/mysql/Percona-5.6
rename to docker/mysql/Percona-5.6.Dockerfile
index 477708d..7e39497 100644
--- a/docker/mysql/Percona-5.6
+++ b/docker/mysql/Percona-5.6.Dockerfile
@@ -12,3 +12,5 @@
FROM percona:5.6
ADD conf/mysql-docker.cnf /etc/mysql/conf.d/z99-docker.cnf
+RUN chown mysql:mysql /etc/mysql/conf.d/z99-docker.cnf \
+ && chmod 0644 /etc/mysql/conf.d/z99-docker.cnf
diff --git a/docker/mysql/Percona-5.7.Dockerfile b/docker/mysql/Percona-5.7.Dockerfile
new file mode 100644
index 0000000..c163aaf
--- /dev/null
+++ b/docker/mysql/Percona-5.7.Dockerfile
@@ -0,0 +1,16 @@
+#++++++++++++++++++++++++++++++++++++++
+# MySQL Docker container
+#++++++++++++++++++++++++++++++++++++++
+#
+# Official images:
+#
+# percona - PerconaDB (MySQL fork) from Percona
+# https://hub.docker.com/r/library/percona/
+#
+#++++++++++++++++++++++++++++++++++++++
+
+FROM percona:5.7
+
+ADD conf/mysql-docker.cnf /etc/mysql/conf.d/z99-docker.cnf
+RUN chown mysql:mysql /etc/mysql/conf.d/z99-docker.cnf \
+ && chmod 0644 /etc/mysql/conf.d/z99-docker.cnf
diff --git a/docker/postgres/Dockerfile b/docker/postgres/Postgres-9.4.Dockerfile
similarity index 79%
rename from docker/postgres/Dockerfile
rename to docker/postgres/Postgres-9.4.Dockerfile
index 3bdd7c8..13bd217 100644
--- a/docker/postgres/Dockerfile
+++ b/docker/postgres/Postgres-9.4.Dockerfile
@@ -5,7 +5,7 @@
# Official images:
#
# postgres - official PostgreSQL
-# https://hub.docker.com/r/library/postgres/
+# https://hub.docker.com/_/postgres/
#
#++++++++++++++++++++++++++++++++++++++
diff --git a/docker/postgres/Postgres-9.5.Dockerfile b/docker/postgres/Postgres-9.5.Dockerfile
new file mode 100644
index 0000000..feeac5d
--- /dev/null
+++ b/docker/postgres/Postgres-9.5.Dockerfile
@@ -0,0 +1,12 @@
+#++++++++++++++++++++++++++++++++++++++
+# PostgreSQL Docker container
+#++++++++++++++++++++++++++++++++++++++
+#
+# Official images:
+#
+# postgres - official PostgreSQL
+# https://hub.docker.com/_/postgres/
+#
+#++++++++++++++++++++++++++++++++++++++
+
+FROM postgres:9.5
diff --git a/docker/solr/Dockerfile b/docker/solr/Dockerfile
index 2195cfc..8401c49 100644
--- a/docker/solr/Dockerfile
+++ b/docker/solr/Dockerfile
@@ -20,18 +20,18 @@ COPY ./conf/ /opt/solr-conf/
RUN curl -sf -o /tmp/solr-typo3-plugin.jar -L http://www.typo3-solr.com/fileadmin/files/solr/solr-typo3-plugin-1.3.0.jar
# Init directories
-RUN cp -a /opt/solr-conf/* /opt/solr/example/solr/
-RUN mkdir -p /opt/solr/example/solr/typo3cores/data
-RUN mkdir -p /opt/solr/example/solr/typo3lib
+RUN cp -a /opt/solr-conf/* /opt/solr/example/solr/ \
+ && mkdir -p /opt/solr/example/solr/typo3cores/data \
+ && mkdir -p /opt/solr/example/solr/typo3lib
# Add plugins
-RUN mv /tmp/solr-typo3-plugin.jar /opt/solr/example/solr/typo3lib/
-RUN ln -s /opt/solr/contrib /opt/solr/example/solr/contrib
+RUN mv /tmp/solr-typo3-plugin.jar /opt/solr/example/solr/typo3lib/ \
+ && ln -s /opt/solr/contrib /opt/solr/example/solr/contrib
# Fix rights
RUN chown solr:solr -R /opt/solr/example/solr/
-VOLUME "/data"
+VOLUME "/opt/solr/server/solr/data"
ENTRYPOINT ["/entrypoint.sh"]
-CMD ["solr"]
\ No newline at end of file
+CMD ["solr"]
diff --git a/docker/solr/entrypoint.sh b/docker/solr/entrypoint.sh
index 2fbaa14..4f3ec51 100755
--- a/docker/solr/entrypoint.sh
+++ b/docker/solr/entrypoint.sh
@@ -1,5 +1,9 @@
#!/bin/bash
+set -o pipefail # trace ERR through pipes
+set -o errtrace # trace ERR through 'time command' and other functions
+set -o nounset ## set -u : exit the script if you try to use an uninitialised variable
+set -o errexit ## set -e : exit the script if any statement returns a non-true return value
###################
# Move storage to storage container
@@ -27,4 +31,4 @@ if [ "$1" = 'solr' ]; then
exec java -jar start.jar
fi
-exec "$@"
\ No newline at end of file
+exec "$@"
diff --git a/docker/storage/Dockerfile b/docker/storage/Dockerfile
index fafb2b2..b8ef05a 100644
--- a/docker/storage/Dockerfile
+++ b/docker/storage/Dockerfile
@@ -2,4 +2,9 @@
# Storage Docker container
#++++++++++++++++++++++++++++++++++++++
-FROM webdevops/storage
+FROM busybox
+
+RUN mkdir /storage \
+ && chmod 1777 /storage
+
+VOLUME "/storage"
diff --git a/docker/tika/Dockerfile b/docker/tika/Dockerfile
new file mode 100644
index 0000000..384d995
--- /dev/null
+++ b/docker/tika/Dockerfile
@@ -0,0 +1 @@
+FROM logicalspark/docker-tikaserver
diff --git a/documentation/CUSTOMIZE.md b/documentation/CUSTOMIZE.md
index e7b7344..ff15984 100644
--- a/documentation/CUSTOMIZE.md
+++ b/documentation/CUSTOMIZE.md
@@ -2,20 +2,19 @@
# Customizing
-## Custom packages (`main` controller)
-
-You can add custom shell commands in `docker/main/{DISTRIBUTION}/bin/customization.sh`
+## Custom packages (`app` controller)
+You can add custom commands in `Dockerfile.*`
## Custom php.ini directives
-Modify the `docker/main/{DISTRIBUTION}/conf/php.ini`, it will be added on top of the default php.ini so
+Modify the `etc/php/development.ini` or `etc/php/production.ini`, it will be added on top of the default php.ini so
you can overwrite any directives.
-After modification rebuild your `main` container:
+After modification rebuild your `app` container:
```bash
docker-compose stop
-docker-compose build main
+docker-compose build app
docker-compose up -d
```
diff --git a/documentation/DOCKER-INFO.md b/documentation/DOCKER-INFO.md
old mode 100644
new mode 100755
index 0b28614..70b335d
--- a/documentation/DOCKER-INFO.md
+++ b/documentation/DOCKER-INFO.md
@@ -6,9 +6,8 @@
Container | Description
------------------------- | -------------------------------
-main | Main container with PHP-FPM and tools (your entrypoint for bash, php and other stuff)
+app | PHP application container with nginx/apache and PHP-FPM and tools (your entrypoint for bash, php and other stuff)
storage | Storage container, eg. for Solr data
-web | Apache HTTPD or Nginx webserver
mysql | MySQL database
postgres (optional) | PostgreSQL database
solr (optional) | Apache Solr server
@@ -17,16 +16,15 @@ memcached (optional) | Memcached server
redis (optional) | Redis server
ftps (optional) | FTP server (vsftpd)
mailcatcher (optional) | Mailserver with easy web and REST interface for mailing
+phpmyadmin (optional) | Tool written in PHP, intended to handle the administration of MySQL over the Web
-This directory will be mounted under `/docker` in `main` and `web` container.
+The `app/` directory will be mounted under `/app` inside `app` container.
## Docker images
Container | Source
------------------------- | -------------------------------
-main/ubuntu | [Ubuntu](https://registry.hub.docker.com/_/ubuntu/) *official* (prebuilt available from https://hub.docker.com/r/webdevops/php-boilerplate/)
-main/centos | [CentOS](https://registry.hub.docker.com/_/centos/) *official* (prebuilt available from https://hub.docker.com/r/webdevops/php-boilerplate/)
+app | [WebDevOps Images](https://registry.hub.docker.com/u/webdevops/)
storage | [Ubuntu](https://registry.hub.docker.com/_/ubuntu/) *official*
-web | [Apache](https://registry.hub.docker.com/_/httpd/) *official* or [Nginx](https://registry.hub.docker.com/_/nginx/) *official*
mysql | [MySQL](https://registry.hub.docker.com/_/mysql/) *official*
postgres | [PostgreSQL](https://registry.hub.docker.com/_/postgres/) *official*
solr (optional) | [Solr](https://registry.hub.docker.com/u/guywithnose/solr/) from _guywithnose_
@@ -35,6 +33,7 @@ memcached (optional) | [Memcached](https://registry.hub.docker.com/_/memcac
redis (optional) | [Redis](https://registry.hub.docker.com/_/redis/) *official*
ftp (optional) | [Ubuntu](https://registry.hub.docker.com/_/ubuntu/) *official*
mailcatcher (optional) | [Mailcatcher](https://registry.hub.docker.com/u/schickling/mailcatcher/) from _schickling_
+phpmyadmin (optional) | [PhpMyAdmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) *official*
## Makefile
@@ -42,7 +41,7 @@ Customize the [Makefile](Makefile) for your needs.
Command | Description
------------------------- | -------------------------------
-make bash | Enter main container with bash (user www-data)
+make bash | Enter main container with bash (user application)
make root | Enter main container with bash (user root)
|
make backup | General backup (run all backup tasks)
@@ -75,6 +74,8 @@ MYSQL_ROOT_PASSWORD | Password for MySQL user "root"
MYSQL_USER | Initial created MySQL user
MYSQL_PASSWORD | Password for initial MySQL user
MYSQL_DATABASE | Initial created MySQL database
+MYSQL_HOST | MySQL Hostname
+MYSQL_PORT | Port that the MySQL instance is using
|
PHP_TIMEZONE | Timezone (date.timezone) setting for PHP (cli and fpm)
EFFECTIVE_UID | Effective UID for php, fpm und webserver
@@ -90,7 +91,7 @@ Hostname | IP or Hostname of VM
Port | 8000
Debugger | Xdebug
Use path mappings | Check
-Path mapping of folder 'code' | /docker/code/
+Path mapping of folder 'app' | /app/
### 2.) Add a debug connection (Run -> Edit Configurations... -> Connections) and create a new configuration (PHP Web Application).
@@ -104,5 +105,5 @@ Save, set a break point and test the debugger.
## Application cache
-Symlink your application cache (eg. typo3temp/) to `/data/cache/` and it will be stored inside the `storage` container
-so it will be accessable within all containers (eg. web or main).
+Symlink your application cache (eg. typo3temp/) to `/storage/cache/` and it will be stored inside the `storage` container
+so it will be accessible within all containers (eg. web or main).
diff --git a/documentation/DOCKER-QUICKSTART.md b/documentation/DOCKER-QUICKSTART.md
index f14b967..78a7336 100644
--- a/documentation/DOCKER-QUICKSTART.md
+++ b/documentation/DOCKER-QUICKSTART.md
@@ -7,6 +7,8 @@
Create and start containers (eg. first start):
```bash
+# copy favorite docker-compose.*.yml to docker-compose.yml
+cp docker-compose.development.yml docker-compose.yml
docker-compose up -d
```
@@ -49,15 +51,15 @@ Logs (eg. for debugging)
# show all logs
docker-compose logs
-# ... or only php
-docker-compose logs main
-
# ... or only php and webserver
-docker-compose logs main web
+docker-compose logs app
+
+# ... or only app and mysql
+docker-compose logs app mysql
```
-CLI script (defined in docker-env.yml)
+CLI script (defined in etc/environment*.yml)
```bash
-docker-compose run --rm main cli help
-```
\ No newline at end of file
+docker-compose run --rm app cli help
+```
diff --git a/documentation/DOCKER-STARTUP.md b/documentation/DOCKER-STARTUP.md
index 1fa4583..b57c057 100644
--- a/documentation/DOCKER-STARTUP.md
+++ b/documentation/DOCKER-STARTUP.md
@@ -9,6 +9,10 @@ Checkout this project and create and run the Docker containers using [docker-com
```bash
git clone https://github.com/webdevops/php-docker-boilerplate.git projectname
cd projectname
+
+# copy favorite docker-compose.*.yml to docker-compose.yml
+cp docker-compose.development.yml docker-compose.yml
+
docker-compose up -d
```
@@ -18,15 +22,15 @@ Now create your project inside the docker boilerplate:
- [Running any other php based project](PROJECT-OTHER.md)
- [Running existing project](PROJECT-EXISTING.md)
-For an existing project just put your files into `code/` folder or use git to clone your project into `code/`.
+For an existing project just put your files into `app/` folder or use git to clone your project into `app/`.
## Advanced usage (git)
Use this boilerplate as template and customize it for each project. Put this Docker
-configuration for each project into seperate git repositories.
+configuration for each project into separate git repositories.
-Now set your existing project repository to be a git submodule in `code/`.
+Now set your existing project repository to be a git submodule in `app/`.
Every developer now needs only to clone the Docker repository with `--recursive` option
to get both, the Docker configuration and the TYPO3 installation.
-For better useability track a whole branch (eg. develop or master) as submodule and not just a single commit.
+For better usability track a whole branch (eg. develop or master) as submodule and not just a single commit. [This requires git v1.8.2+](https://git.kernel.org/cgit/git/git.git/tree/Documentation/RelNotes/1.8.2.txt?id=v1.8.2#n186).
diff --git a/documentation/INSTALL.md b/documentation/INSTALL.md
index a88fcdd..3060b5f 100644
--- a/documentation/INSTALL.md
+++ b/documentation/INSTALL.md
@@ -2,24 +2,19 @@
# Installation
-## Reqirements
+## Requirements
- GNU/Linux with Docker (recommendation: [Vagrant](https://www.vagrantup.com/downloads.html) VM with Docker or [native Linux with Docker](http://docs.docker.com/linux/step_one/)
-- make
+- [make](https://en.wikipedia.org/wiki/Make_(software)), [GNU manual for make](https://www.gnu.org/software/make/manual/make.html)
- [composer](https://getcomposer.org/)
- [docker-compose](https://github.com/docker/compose)
If you want to run a Docker VM make sure you're using VMware or Parallels Desktop because of
the much faster virtualisation (networking, disk access, shared folders) compared to VirtualBox.
-There is also a [Vagrant VM for VirtualBox, VMware and Parallels](https://github.com/webdevops/vagrant-development)
+There is also a [Vagrant VM for VirtualBox, VMware and Parallels](https://github.com/webdevops/vagrant-docker-vm)
with a mailcatcher (Postfix with Dovecot, catches all outgoing mails).
-_Warning:_ Boot2docker ist not recommended because of slow/buggy file sharing between host and guest and there is no
-convienient way to access the box with Samba or SSH.
-This Docker boilerplate tries to avoid common anti-pattners like a Samba/SSH container because Boot2docker
-isn't able to handle such tasks.
-
For more convenience use [CliTools.phar](https://github.com/webdevops/clitools) (will also run on native Linux, not only inside a Vagrant box)
## First startup
@@ -29,8 +24,8 @@ git clone --recursive https://github.com/webdevops/php-docker-boilerplate.git pr
cd projectname
-# for local development (shared volumes)
-cp docker-compose-development.yml docker-compose.yml
+# copy favorite docker-compose.*.yml to docker-compose.yml
+cp docker-compose.development.yml docker-compose.yml
docker-compose up -d
```
diff --git a/documentation/PROJECT-EXISTING.md b/documentation/PROJECT-EXISTING.md
index c068d1a..fbb4a61 100644
--- a/documentation/PROJECT-EXISTING.md
+++ b/documentation/PROJECT-EXISTING.md
@@ -12,18 +12,18 @@ make create git https://github..../
or manually
```bash
-git clone --recursive https://github..../ code/
+git clone --recursive https://github..../ app/
```
-Check `DOCUMENT_ROOT` and `DOCUMENT_INDEX` in `docker-env.yml`
+Check `DOCUMENT_ROOT` and `DOCUMENT_INDEX` in `etc/environment*.yml`
## Cli runner
-You can run one-shot command inside the `main` service container:
+You can run one-shot command inside the `app` service container:
```bash
-docker-compose run --rm main any-php-file.php argument1 argument2
-docker-compose run --rm main bash
+docker-compose run --rm app any-php-file.php argument1 argument2
+docker-compose run --rm app bash
```
Webserver is available at Port 8000
diff --git a/documentation/PROJECT-OTHER.md b/documentation/PROJECT-OTHER.md
index 4e49c81..93bb229 100644
--- a/documentation/PROJECT-OTHER.md
+++ b/documentation/PROJECT-OTHER.md
@@ -4,17 +4,17 @@
## Create project
-- Put your project files into `code/`
-- If needed modify `DOCUMENT_ROOT` and `DOCUMENT_INDEX` in `docker-env.yml`
+- Put your project files into `app/`
+- If needed modify `DOCUMENT_ROOT` and `DOCUMENT_INDEX` in `etc/environment*.yml`
- You're done - really
## Cli runner
-You can run one-shot command inside the `main` service container:
+You can run one-shot command inside the `app` service container:
```bash
-docker-compose run --rm main any-php-file.php argument1 argument2
-docker-compose run --rm main bash
+docker-compose run --rm app any-php-file.php argument1 argument2
+docker-compose run --rm app bash
```
Webserver is available at Port 8000
diff --git a/documentation/PROJECT-SYMFONY.md b/documentation/PROJECT-SYMFONY.md
index 8c258ba..d88f043 100644
--- a/documentation/PROJECT-SYMFONY.md
+++ b/documentation/PROJECT-SYMFONY.md
@@ -8,9 +8,9 @@
make create symfony
```
-And change `DOCUMENT_ROOT` and `DOCUMENT_ROOT` in `docker-env.yml`:
+And change `DOCUMENT_ROOT` and `DOCUMENT_ROOT` in `etc/environment*.yml`:
- DOCUMENT_ROOT=code/web/
+ DOCUMENT_ROOT=/app/web/
DOCUMENT_INDEX=app_dev.php
## SYMFONY cli runner
@@ -18,8 +18,8 @@ And change `DOCUMENT_ROOT` and `DOCUMENT_ROOT` in `docker-env.yml`:
You can run one-shot command inside the `main` service container:
```bash
-docker-compose run --rm main php code/app/console
-docker-compose run --rm main bash
+docker-compose run --rm app php /app/console
+docker-compose run --rm app bash
```
Webserver is available at Port 8000
diff --git a/documentation/SERVICES.md b/documentation/SERVICES.md
old mode 100644
new mode 100755
index eed775e..1782129
--- a/documentation/SERVICES.md
+++ b/documentation/SERVICES.md
@@ -2,11 +2,11 @@
# Services
-### Web (Nginx or Apache HTTPd)
+### App (PHP with Nginx or Apache HTTPd)
Setting | Value
------------- | -------------
-Host | web:80 and web:443 (ssl)
+Host | app:80 and app:443 (ssl)
External Port | 8000 and 8443 (ssl)
### MySQL
@@ -80,4 +80,14 @@ Host | ftp
Ports | 20,21
User | dev (if not changed in env)
Password | dev (if not changed in env)
-Path | /data/ftp (if not changed in env)
+Path | /storage/ftp (if not changed in env)
+
+### PhpMyAdmin
+
+Setting | Value
+------------- | -------------
+Host | phpmyadmin
+Ports | 8001
+Log in server | mysql
+Username | dev (if not changed in env, see mysql container configuration)
+Password | dev (if not changed in env, see mysql container configuration)
diff --git a/documentation/TROUBLESHOOTING.md b/documentation/TROUBLESHOOTING.md
index 0dd8e4b..6309d32 100644
--- a/documentation/TROUBLESHOOTING.md
+++ b/documentation/TROUBLESHOOTING.md
@@ -4,19 +4,19 @@
## Startup or (docker) linking errors (safe reset)
-If you got any startup issues you can try to rebuild `main` and `web` containers.
+If you got any startup issues you can try to rebuild `app` containers.
You won't lose any data with this way - it's a safe reset.
```bash
docker-compose stop
-docker-compose rm --force main web
-docker-compose build --no-cache main web
+docker-compose rm --force app
+docker-compose build --no-cache app
docker-compose up -d
```
## Complete reset
-Reset all containers, delete all data (`mysql`, `solr` ..) but not your project files in `code/`!
+Reset all containers, delete all data (`mysql`, `solr` ..) but not your project files in `app/`!
```bash
docker-compose stop
diff --git a/documentation/UPDATE.md b/documentation/UPDATE.md
index a766686..5880b8d 100644
--- a/documentation/UPDATE.md
+++ b/documentation/UPDATE.md
@@ -7,17 +7,27 @@
If you have cloned the git repository it's safe to pull the new version.
If you have used a zip file make sure to replace the `docker/` directory and also
-update `docker-compose.yml` and `docker-env.yml`.
+update `docker-compose.yml` and `docker-environment.yml`.
For [changes see CHANGELOG.md](/CHANGELOG.md)
+## Upgrade to 5.0.x
+Because of a huge refactoring you need to rebuild the `app` container. The `web` container isn't used anymore.
+
+```bash
+docker-compose stop
+docker-compose rm --force app
+docker-compose build --no-cache web
+docker-compose up
+```
+
## Update to 3.4.x
As `PHP_UID` was replaced with `EFFECTIVE_UID` and `PHP_GID` was replaced with `EFFECTIVE_GID` you
have to rebuild all containers with this variables: `main` and `web`
```bash
docker-compose stop
-docker-compose rm --force main web
-docker-compose build --no-cache main web
+docker-compose rm --force app
+docker-compose build --no-cache web
docker-compose up
```
diff --git a/documentation/docs/Makefile b/documentation/docs/Makefile
new file mode 100644
index 0000000..dcf3199
--- /dev/null
+++ b/documentation/docs/Makefile
@@ -0,0 +1,216 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help
+help:
+ @echo "Please use \`make ' where is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " applehelp to make an Apple Help Book"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " texinfo to make Texinfo files"
+ @echo " info to make Texinfo files and run them through makeinfo"
+ @echo " gettext to make PO message catalogs"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " xml to make Docutils-native XML files"
+ @echo " pseudoxml to make pseudoxml-XML files for display purposes"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+ @echo " coverage to run coverage check of the documentation (if enabled)"
+
+.PHONY: clean
+clean:
+ rm -rf $(BUILDDIR)/*
+
+.PHONY: html
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+.PHONY: dirhtml
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+.PHONY: singlehtml
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+.PHONY: pickle
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+.PHONY: json
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+.PHONY: htmlhelp
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+.PHONY: qthelp
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/WebDevOpsDocumentation.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/WebDevOpsDocumentation.qhc"
+
+.PHONY: applehelp
+applehelp:
+ $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
+ @echo
+ @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
+ @echo "N.B. You won't be able to view it unless you put it in" \
+ "~/Library/Documentation/Help or install it in your application" \
+ "bundle."
+
+.PHONY: devhelp
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/WebDevOpsDocumentation"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/WebDevOpsDocumentation"
+ @echo "# devhelp"
+
+.PHONY: epub
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+.PHONY: latex
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+.PHONY: latexpdf
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+.PHONY: latexpdfja
+latexpdfja:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through platex and dvipdfmx..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+.PHONY: text
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+.PHONY: man
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+.PHONY: texinfo
+texinfo:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo
+ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+ @echo "Run \`make' in that directory to run these through makeinfo" \
+ "(use \`make info' here to do that automatically)."
+
+.PHONY: info
+info:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo "Running Texinfo files through makeinfo..."
+ make -C $(BUILDDIR)/texinfo info
+ @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+.PHONY: gettext
+gettext:
+ $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+ @echo
+ @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+.PHONY: changes
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+.PHONY: linkcheck
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+.PHONY: doctest
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
+
+.PHONY: coverage
+coverage:
+ $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
+ @echo "Testing of coverage in the sources finished, look at the " \
+ "results in $(BUILDDIR)/coverage/python.txt."
+
+.PHONY: xml
+xml:
+ $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+ @echo
+ @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+.PHONY: pseudoxml
+pseudoxml:
+ $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+ @echo
+ @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
diff --git a/documentation/docs/conf.py b/documentation/docs/conf.py
new file mode 100644
index 0000000..dacc2c4
--- /dev/null
+++ b/documentation/docs/conf.py
@@ -0,0 +1,300 @@
+# -*- coding: utf-8 -*-
+#
+# PHP Docker Boilerplate Documentation build configuration file, created by
+# sphinx-quickstart on Sat Mar 19 12:21:05 2016.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+from recommonmark.parser import CommonMarkParser
+
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+if not on_rtd: # only import and set the theme if we're building docs locally
+ import sphinx_rtd_theme
+ html_theme = 'sphinx_rtd_theme'
+ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+
+html_sidebars = {
+ '**': ['globaltoc.html'],
+}
+# otherwise, readthedocs.org uses their theme by default, so no need to specify it
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+source_suffix = ['.rst', '.md']
+# source_suffix = '.rst'
+
+source_parsers = {
+ '.md': CommonMarkParser,
+}
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'PHP Docker Boilerplate Documentation'
+copyright = u'2016, Team WebDevOps'
+author = u'Team WebDevOps'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+#version = u'0.0.2'
+# The full version, including alpha/beta/rc tags.
+#release = u'0.0.2'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#html_theme = 'alabaster'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# " v documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (relative to this directory) to use as a favicon of
+# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Language to be used for generating the HTML full-text search index.
+# Sphinx supports the following languages:
+# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
+# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
+#html_search_language = 'en'
+
+# A dictionary with options for the search language support, empty by default.
+# Now only 'ja' uses this config value
+#html_search_options = {'type': 'default'}
+
+# The name of a javascript file (relative to the configuration directory) that
+# implements a search results scorer. If empty, the default will be used.
+#html_search_scorer = 'scorer.js'
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'PhpDockerBoilerplateDocumentationdoc'
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+
+# Latex figure (float) alignment
+#'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ (master_doc, 'PhpDockerBoilerplateDocumentation.tex', u'PHP Docker Boilerplate Documentation',
+ u'Florian Tatzel', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ (master_doc, 'phpdockerboilerplatedocumentation', u'PHP Docker Boilerplate Documentation',
+ [author], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ (master_doc, 'PhpDockerBoilerplateDocumentation', u'PHP Docker Boilerplate Documentation',
+ author, 'PhpDockerBoilerplateDocumentation', 'One line description of project.',
+ 'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
diff --git a/documentation/docs/content/components/ansibleRoles/roles.rst b/documentation/docs/content/components/ansibleRoles/roles.rst
new file mode 100644
index 0000000..658853b
--- /dev/null
+++ b/documentation/docs/content/components/ansibleRoles/roles.rst
@@ -0,0 +1,5 @@
+===========================
+Ansible Roles Configuration
+===========================
+
+This section is not done yet!
diff --git a/documentation/docs/content/components/dockerCompose.rst b/documentation/docs/content/components/dockerCompose.rst
new file mode 100644
index 0000000..f5ee7a8
--- /dev/null
+++ b/documentation/docs/content/components/dockerCompose.rst
@@ -0,0 +1,5 @@
+====================
+Docker Compose Setup
+====================
+
+This section is not done yet!
diff --git a/documentation/docs/content/components/dockerfiles.rst b/documentation/docs/content/components/dockerfiles.rst
new file mode 100644
index 0000000..f6da05b
--- /dev/null
+++ b/documentation/docs/content/components/dockerfiles.rst
@@ -0,0 +1,5 @@
+===========
+Dockerfiles
+===========
+
+This section is not done yet!
diff --git a/documentation/docs/content/components/index.rst b/documentation/docs/content/components/index.rst
new file mode 100644
index 0000000..b18d888
--- /dev/null
+++ b/documentation/docs/content/components/index.rst
@@ -0,0 +1,14 @@
+=================
+Project Structure
+=================
+
+This section is not done yet!
+
+
+.. toctree::
+ :maxdepth: 1
+
+ dockerfiles
+ dockerCompose
+ scripts
+ ansibleRoles/roles
diff --git a/documentation/docs/content/components/scripts.rst b/documentation/docs/content/components/scripts.rst
new file mode 100644
index 0000000..ba856ae
--- /dev/null
+++ b/documentation/docs/content/components/scripts.rst
@@ -0,0 +1,12 @@
+========================
+Scripts and Provisioning
+========================
+
+This section is not done yet!
+
+-------------
+Ansible Roles
+-------------
+
+This section is not done yet!
+
diff --git a/documentation/docs/content/contribute/code.rst b/documentation/docs/content/contribute/code.rst
new file mode 100644
index 0000000..b558f21
--- /dev/null
+++ b/documentation/docs/content/contribute/code.rst
@@ -0,0 +1,5 @@
+=================
+Contributing Code
+=================
+
+How to contribute Code
diff --git a/documentation/docs/content/contribute/documentation.rst b/documentation/docs/content/contribute/documentation.rst
new file mode 100644
index 0000000..84a7b91
--- /dev/null
+++ b/documentation/docs/content/contribute/documentation.rst
@@ -0,0 +1,5 @@
+========================
+Contribute Documentation
+========================
+
+How to contribute Documentation
diff --git a/documentation/docs/content/contribute/index.rst b/documentation/docs/content/contribute/index.rst
new file mode 100644
index 0000000..dea2e5f
--- /dev/null
+++ b/documentation/docs/content/contribute/index.rst
@@ -0,0 +1,12 @@
+=================
+How to Contribute
+=================
+
+This section is not done yet!
+
+
+.. toctree::
+ :maxdepth: 1
+
+ code
+ documentation
diff --git a/documentation/docs/content/gettingStarted/index.rst b/documentation/docs/content/gettingStarted/index.rst
new file mode 100644
index 0000000..38f6a07
--- /dev/null
+++ b/documentation/docs/content/gettingStarted/index.rst
@@ -0,0 +1,44 @@
+===============
+Getting Started
+===============
+
+------------
+Requirements
+------------
+
+* Docker host (eg. Vagrant Docker VM or dinghy)
+* Docker compose
+
+------------
+Installation
+------------
+
+Clone the boilerplate and link or copy ``docker-compose.development.yml``
+
+.. code-block:: bash
+
+ git clone https://github.com/webdevops/php-docker-boilerplate.git project
+ cd project
+ cp docker-compose.development.yml docker-compose.yml
+
+-----
+Usage
+-----
+
+Startup containers and run the services:
+
+.. code-block:: bash
+
+ docker-compose up -d
+
+------------------------------
+Web access (dinghy http proxy)
+------------------------------
+
+If you're using dinghy docker](https://github.com/codekitchen/dinghy) you can access the services via
+
+- Application: http://app.boilerplate.docker/
+- Mailhog: http://mail.boilerplate.docker
+- PHPMyAdmin: http://pma.boilerplate.docker
+- Solr: http://solr.boilerplate.docker
+- Elasticsearch: http://elasticsearch.boilerplate.docker
diff --git a/documentation/docs/content/introduction.rst b/documentation/docs/content/introduction.rst
new file mode 100644
index 0000000..e9e4a87
--- /dev/null
+++ b/documentation/docs/content/introduction.rst
@@ -0,0 +1,10 @@
+============
+Introduction
+============
+
+---------------------------------------
+What is the PHP Docker Boilerplate for?
+---------------------------------------
+
+This PHP Docker Boilerplate is for an example layout for an PHP application with most common services like MySQL or
+Postgres and with a development and production context and settings.
diff --git a/documentation/docs/content/usage/dockerCompose.rst b/documentation/docs/content/usage/dockerCompose.rst
new file mode 100644
index 0000000..012302e
--- /dev/null
+++ b/documentation/docs/content/usage/dockerCompose.rst
@@ -0,0 +1,7 @@
+============================
+Docker Compose Configuration
+============================
+
+Inside the `docker-compose.*.yml` files the service layout and links between the layout can be defined.
+
+For some services also the version can be chosen, eg. `MySQL-5.7.Dockerfile`
diff --git a/documentation/docs/content/usage/dockerImages.rst b/documentation/docs/content/usage/dockerImages.rst
new file mode 100644
index 0000000..dcda8ad
--- /dev/null
+++ b/documentation/docs/content/usage/dockerImages.rst
@@ -0,0 +1,6 @@
+=========================
+Customizing Docker Images
+=========================
+
+The main `Dockerfile.*` for the php application container can be customized as any normal Dockerfile image.
+
diff --git a/documentation/docs/content/usage/index.rst b/documentation/docs/content/usage/index.rst
new file mode 100644
index 0000000..d059bbb
--- /dev/null
+++ b/documentation/docs/content/usage/index.rst
@@ -0,0 +1,12 @@
+=====
+Usage
+=====
+
+This section is not done yet!
+
+.. toctree::
+ :maxdepth: 1
+
+ dockerCompose
+ dockerImages
+ vagrantDockerVM
diff --git a/documentation/docs/content/usage/vagrantDockerVM.rst b/documentation/docs/content/usage/vagrantDockerVM.rst
new file mode 100644
index 0000000..b0e7e7c
--- /dev/null
+++ b/documentation/docs/content/usage/vagrantDockerVM.rst
@@ -0,0 +1,10 @@
+==============================
+Synergy with Vagrant Docker VM
+==============================
+
+The [Vagrant Docker VM](https://github.com/webdevops/vagrant-docker-vm) (Ubuntu 16.04) is using
+[dinghy docker](https://github.com/codekitchen/dinghy) for providing an automatic and dynamic reverse proxy
+which makes easy to start multiple instances of the boilerplate.
+
+You can also use [dinghy docker](https://github.com/codekitchen/dinghy) standalone if you don't need
+an full Linux environment.
diff --git a/documentation/docs/index.rst b/documentation/docs/index.rst
new file mode 100644
index 0000000..3742049
--- /dev/null
+++ b/documentation/docs/index.rst
@@ -0,0 +1,30 @@
+.. WebDevOps Documentation documentation master file, created by
+ sphinx-quickstart on Sat Mar 19 12:21:05 2016.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+:orphan: true
+
+========
+Overview
+========
+
+| Welcome to the documentation pages for the WebDevOps PHP Docker Boilerplate.
+|
+| Here you will find informations about the usage of the PHP Docker Boilerplate, as well as informations about the components we used to compose it.
+| This documentation is work in progess and we appeciate every help we can get, so feel free to contribute.
+|
+|
+
+.. toctree::
+
+ Back to Project Overview
+ content/introduction
+
+.. toctree::
+ :caption: Documentation
+
+ content/gettingStarted/index
+ content/usage/index
+ content/components/index
+ content/contribute/index
diff --git a/documentation/docs/make.bat b/documentation/docs/make.bat
new file mode 100644
index 0000000..86bd9f2
--- /dev/null
+++ b/documentation/docs/make.bat
@@ -0,0 +1,263 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+set I18NSPHINXOPTS=%SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+ set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^` where ^ is one of
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. singlehtml to make a single large HTML file
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp project
+ echo. devhelp to make HTML files and a Devhelp project
+ echo. epub to make an epub
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+ echo. text to make text files
+ echo. man to make manual pages
+ echo. texinfo to make Texinfo files
+ echo. gettext to make PO message catalogs
+ echo. changes to make an overview over all changed/added/deprecated items
+ echo. xml to make Docutils-native XML files
+ echo. pseudoxml to make pseudoxml-XML files for display purposes
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if enabled
+ echo. coverage to run coverage check of the documentation if enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+
+REM Check if sphinx-build is available and fallback to Python version if any
+%SPHINXBUILD% 1>NUL 2>NUL
+if errorlevel 9009 goto sphinx_python
+goto sphinx_ok
+
+:sphinx_python
+
+set SPHINXBUILD=python -m sphinx.__init__
+%SPHINXBUILD% 2> nul
+if errorlevel 9009 (
+ echo.
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+ echo.installed, then set the SPHINXBUILD environment variable to point
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
+ echo.may add the Sphinx directory to PATH.
+ echo.
+ echo.If you don't have Sphinx installed, grab it from
+ echo.http://sphinx-doc.org/
+ exit /b 1
+)
+
+:sphinx_ok
+
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "singlehtml" (
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\WebDevOpsDocumentation.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\WebDevOpsDocumentation.ghc
+ goto end
+)
+
+if "%1" == "devhelp" (
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished.
+ goto end
+)
+
+if "%1" == "epub" (
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "latexpdf" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ cd %BUILDDIR%/latex
+ make all-pdf
+ cd %~dp0
+ echo.
+ echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "latexpdfja" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ cd %BUILDDIR%/latex
+ make all-pdf-ja
+ cd %~dp0
+ echo.
+ echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "text" (
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The text files are in %BUILDDIR%/text.
+ goto end
+)
+
+if "%1" == "man" (
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
+ goto end
+)
+
+if "%1" == "texinfo" (
+ %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+ goto end
+)
+
+if "%1" == "gettext" (
+ %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+if "%1" == "coverage" (
+ %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Testing of coverage in the sources finished, look at the ^
+results in %BUILDDIR%/coverage/python.txt.
+ goto end
+)
+
+if "%1" == "xml" (
+ %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The XML files are in %BUILDDIR%/xml.
+ goto end
+)
+
+if "%1" == "pseudoxml" (
+ %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
+ goto end
+)
+
+:end
diff --git a/etc/application.development.yml b/etc/application.development.yml
deleted file mode 100644
index c3cd898..0000000
--- a/etc/application.development.yml
+++ /dev/null
@@ -1,37 +0,0 @@
----
-
-PROVISION:
- systemUpdate: false
-
- install:
- phpComposer: true
- phpBlackfire: false
- phpXdebug: false
-
-WEB:
- vhost:
- - { serverName: "docker.vm", serverAlias: "*.vm" }
-
-DNS:
- domain:
- - { domain: ".vm", address: "127.0.0.1" }
-
-MAIL:
- conf:
- - { variable: "inet_interfaces", value: "loopback-only" }
- # - { variable: "relayhost", value: "foobar" }
-
-PHP:
- fpm:
- conf:
- # PM
- - { variable: "pm.max_children", value: "15" }
- - { variable: "pm.start_servers", value: "2" }
- - { variable: "pm.min_spare_servers", value: "1" }
- - { variable: "pm.max_spare_servers", value: "3" }
- # Misc
- - { variable: "catch_workers_output", value: "yes" }
- # Logs
- - { variable: "access.format", value: "%R - %u %t \"%m %r%Q%q\" %s %f cpu:%C%% mem:%{megabytes}M reqTime:%d" }
- - { variable: "request_slowlog_timeout", value: "10s" }
- - { variable: "php_admin_flag[log_errors]", value: "on" }
diff --git a/etc/application.environment.yml b/etc/application.environment.yml
deleted file mode 100644
index 5de506a..0000000
--- a/etc/application.environment.yml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-
-DOCKER_ENVIRONMENT:
- # Application
- TYPO3_CONTEXT: "{{ lookup('env','TYPO3_CONTEXT') }}"
-
- SYMFONY_ENV: "{{ lookup('env','SYMFONY_ENV') }}"
- SYMFONY_DEBUG: "{{ lookup('env','SYMFONY_DEBUG') }}"
-
- CAKE_ENV: "{{ lookup('env','CAKE_ENV') }}"
-
- YII_ENVIRONMENT: "{{ lookup('env','YII_ENVIRONMENT') }}"
-
- # General
- CLI_SCRIPT: "{{ lookup('env','CLI_SCRIPT') }}"
- MAIL_GATEWAY: "{{ lookup('env','MAIL_GATEWAY') }}"
-
- # MySQL
- MYSQL_ROOT_PASSWORD: "{{ lookup('env','MYSQL_ROOT_PASSWORD') }}"
- MYSQL_USER: "{{ lookup('env','MYSQL_USER') }}"
- MYSQL_PASSWORD: "{{ lookup('env','MYSQL_PASSWORD') }}"
- MYSQL_DATABASE: "{{ lookup('env','MYSQL_DATABASE') }}"
-
- # Postgres
- POSTGRES_USER: "{{ lookup('env','POSTGRES_USER') }}"
- POSTGRES_PASSWORD: "{{ lookup('env','POSTGRES_PASSWORD') }}"
-
- # FTP
- FTP_USER: "{{ lookup('env','FTP_USER') }}"
- FTP_PASSWORD: "{{ lookup('env','FTP_PASSWORD') }}"
- FTP_PATH: "{{ lookup('env','FTP_PATH') }}"
diff --git a/etc/application.production.yml b/etc/application.production.yml
deleted file mode 100644
index 0111e5e..0000000
--- a/etc/application.production.yml
+++ /dev/null
@@ -1,37 +0,0 @@
----
-
-PROVISION:
- systemUpdate: true
-
- install:
- phpComposer: true
- phpBlackfire: false
- phpXdebug: false
-
-WEB:
- vhost:
- - { serverName: "docker.vm", serverAlias: "*.vm" }
-
-DNS:
- domain:
- - { domain: ".vm", address: "127.0.0.1" }
-
-MAIL:
- conf:
- - { variable: "inet_interfaces", value: "loopback-only" }
- # - { variable: "relayhost", value: "foobar" }
-
-PHP:
- fpm:
- conf:
- # PM
- - { variable: "pm.max_children", value: "30" }
- - { variable: "pm.start_servers", value: "10 }
- - { variable: "pm.min_spare_servers", value: "5" }
- - { variable: "pm.max_spare_servers", value: "10" }
- # Misc
- - { variable: "catch_workers_output", value: "yes" }
- # Logs
- - { variable: "access.format", value: "%R - %u %t \"%m %r%Q%q\" %s %f" }
- - { variable: "request_slowlog_timeout", value: "10s" }
- - { variable: "php_admin_flag[log_errors]", value: "on" }
diff --git a/etc/cron/crontab b/etc/cron/crontab
index e69de29..3036fe8 100644
--- a/etc/cron/crontab
+++ b/etc/cron/crontab
@@ -0,0 +1 @@
+# m h dom mon dow user command
diff --git a/docker-environment.development.yml b/etc/environment.development.yml
similarity index 80%
rename from docker-environment.development.yml
rename to etc/environment.development.yml
index 6ee579a..799762d 100644
--- a/docker-environment.development.yml
+++ b/etc/environment.development.yml
@@ -6,6 +6,11 @@
# to apply them
#######################################
+#######################################
+# PHP Debugger (xdebug|blackfire|none)
+
+PHP_DEBUGGER=xdebug
+
#######################################
# Context environment
@@ -21,3 +26,4 @@ CAKE_ENV=dev
# yii
YII_ENVIRONMENT=Development
+
diff --git a/docker-environment.production.yml b/etc/environment.production.yml
similarity index 100%
rename from docker-environment.production.yml
rename to etc/environment.production.yml
diff --git a/docker-environment.yml b/etc/environment.yml
similarity index 58%
rename from docker-environment.yml
rename to etc/environment.yml
index fbd5ce5..5e327dd 100644
--- a/docker-environment.yml
+++ b/etc/environment.yml
@@ -10,9 +10,38 @@
# Webserver
# General
-WEB_DOCUMENT_ROOT=/application/code/
+WEB_DOCUMENT_ROOT=/app/
WEB_DOCUMENT_INDEX=index.php
-CLI_SCRIPT=php /application/code/index.php
+CLI_SCRIPT=php /app/index.php
+
+#######################################
+# PHP settings
+# (available in docker images after 2017-06-15)
+
+# PHP.ini
+
+# php.memory_limit=2G
+# php.date.timezone=UTC
+# php.display_errors=1
+# php.max_execution_time=600
+# php.post_max_size=50M
+# php.upload_max_filesize=50M
+
+# FPM global (master)
+
+# fpm.global.process_control_timeout=5m
+# fpm.global.process.max=100
+
+# FPM pool
+
+# fpm.pool.pm=dynamic
+# fpm.pool.pm.max_children=20
+# fpm.pool.pm.start_servers=20
+# fpm.pool.pm.min_spare_servers=1
+# fpm.pool.pm.max_spare_servers=3
+# fpm.pool.pm.process_idle_timeout=10s
+# fpm.pool.pm.max_requests=1000
+# fpm.pool.request_terminate_timeout=5m
#######################################
# SSH settings
@@ -39,10 +68,11 @@ MYSQL_DATABASE=database
# PostgreSQL settings
POSTGRES_USER=dev
POSTGRES_PASSWORD=dev
+POSTGRES_DATABASE=dev
#######################################
# FTP settings
FTP_USER=dev
FTP_PASSWORD=dev
-FTP_PATH=/data/ftp/
-#FTP_PATH=/docker/code/
+FTP_PATH=/storage/ftp/
+#FTP_PATH=/app/
diff --git a/etc/php/development.ini b/etc/php/development.ini
index d823fcf..f4802d2 100644
--- a/etc/php/development.ini
+++ b/etc/php/development.ini
@@ -1,3 +1,7 @@
+; -------------------------------------
+; DEVELOPMENT configuration
+; -------------------------------------
+
; this file will overwrite default php.ini settings
display_errors = 1
@@ -16,6 +20,8 @@ post_max_size = 50M
upload_max_filesize = 50M
max_input_vars = 5000
+expose_php = Off
+
date.timezone = Europe/Berlin
mysql.default_host = mysql
diff --git a/etc/php/production.ini b/etc/php/production.ini
index d457fab..616e470 100644
--- a/etc/php/production.ini
+++ b/etc/php/production.ini
@@ -1,3 +1,7 @@
+; -------------------------------------
+; PRODUCTION configuration
+; -------------------------------------
+
; this file will overwrite default php.ini settings
display_errors = 0
@@ -16,6 +20,8 @@ post_max_size = 50M
upload_max_filesize = 50M
max_input_vars = 5000
+expose_php = Off
+
date.timezone = Europe/Berlin
mysql.default_host = mysql
diff --git a/provision/roles/boilerplate-deployment/tasks/main.yml b/provision/roles/boilerplate-deployment/tasks/main.yml
deleted file mode 100644
index 2651211..0000000
--- a/provision/roles/boilerplate-deployment/tasks/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-
-# add deployment tasks here
\ No newline at end of file
diff --git a/provision/roles/boilerplate-main-development/defaults/main.yml b/provision/roles/boilerplate-main-development/defaults/main.yml
deleted file mode 100644
index 88d1b8a..0000000
--- a/provision/roles/boilerplate-main-development/defaults/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
- PROVISION_CONTEXT: "{{ lookup('env','PROVISION_CONTEXT') }}"
diff --git a/provision/roles/boilerplate-main-development/tasks/bootstrap.yml b/provision/roles/boilerplate-main-development/tasks/bootstrap.yml
deleted file mode 100644
index ef2c3fa..0000000
--- a/provision/roles/boilerplate-main-development/tasks/bootstrap.yml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-
-- include: bootstrap/php-blackfire/centos.yml
- when: ansible_distribution == 'CentOS' and PROVISION.install.phpBlackfire
-
-- include: bootstrap/php-xdebug/centos.yml
- when: ansible_distribution == 'CentOS' and PROVISION.install.phpXdebug
-
-
-- include: bootstrap/php-blackfire/ubuntu.yml
- when: ansible_distribution == 'Ubuntu' and PROVISION.install.phpBlackfire
-
-- include: bootstrap/php-xdebug/ubuntu.yml
- when: ansible_distribution == 'Ubuntu' and PROVISION.install.phpXdebug
-
diff --git a/provision/roles/boilerplate-main-development/tasks/bootstrap/php-blackfire/centos.yml b/provision/roles/boilerplate-main-development/tasks/bootstrap/php-blackfire/centos.yml
deleted file mode 100644
index 56dcc76..0000000
--- a/provision/roles/boilerplate-main-development/tasks/bootstrap/php-blackfire/centos.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-
-- name: Add blackfire.io key
- rpm_key:
- key: https://packagecloud.io/gpg.key
- state: present
-
-- name: Add blackfire.io repository
- get_url:
- url: http://packages.blackfire.io/fedora/blackfire.repo
- dest: /etc/yum.repos.d/blackfire.repo
- mode: 0644
-
-- name: Disable gpg check for blackfire (CentOS 7 workaround)
- lineinfile:
- dest: /etc/yum.repos.d/blackfire.repo
- regexp: '^repo_gpgcheck=1'
- line: 'repo_gpgcheck=0'
- when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'
-
-- name: Install blackfire-php
- yum:
- name: '{{ item }}'
- state: present
- with_items:
- - blackfire-php
diff --git a/provision/roles/boilerplate-main-development/tasks/bootstrap/php-blackfire/ubuntu.yml b/provision/roles/boilerplate-main-development/tasks/bootstrap/php-blackfire/ubuntu.yml
deleted file mode 100644
index 243bee6..0000000
--- a/provision/roles/boilerplate-main-development/tasks/bootstrap/php-blackfire/ubuntu.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-
-- name: Add blackfire.io key
- apt_key:
- url: https://packagecloud.io/gpg.key
- state: present
-
-- name: Add blackfire.io repository
- apt_repository:
- repo: 'deb http://packages.blackfire.io/debian any main'
- state: present
- update_cache: yes
-
-- name: Install blackfire-php
- apt:
- name: '{{ item }}'
- state: present
- with_items:
- - blackfire-php
diff --git a/provision/roles/boilerplate-main-development/tasks/bootstrap/php-xdebug/centos.yml b/provision/roles/boilerplate-main-development/tasks/bootstrap/php-xdebug/centos.yml
deleted file mode 100644
index d5a44c0..0000000
--- a/provision/roles/boilerplate-main-development/tasks/bootstrap/php-xdebug/centos.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-
-- name: Add blackfire.io key
- rpm_key:
- key: https://packagecloud.io/gpg.key
- state: present
-
-- name: Add blackfire.io repository
- get_url:
- url: http://packages.blackfire.io/fedora/blackfire.repo
- dest: /etc/yum.repos.d/blackfire.repo
- mode: 0644
-
-- name: Disable gpg check for blackfire (CentOS 7 workaround)
- lineinfile:
- dest: /etc/yum.repos.d/blackfire.repo
- regexp: '^repo_gpgcheck=1'
- line: 'repo_gpgcheck=0'
- when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'
-
-- name: Install blackfire-php
- yum:
- name: '{{ item }}'
- state: present
- with_items:
- - blackfire-php
-
-- name: Install xdebug
- yum:
- name: '{{ item }}'
- state: present
- with_items:
- - php-xdebug
diff --git a/provision/roles/boilerplate-main-development/tasks/bootstrap/php-xdebug/ubuntu.yml b/provision/roles/boilerplate-main-development/tasks/bootstrap/php-xdebug/ubuntu.yml
deleted file mode 100644
index e0a1217..0000000
--- a/provision/roles/boilerplate-main-development/tasks/bootstrap/php-xdebug/ubuntu.yml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-
-- name: Add blackfire.io key
- apt_key:
- url: https://packagecloud.io/gpg.key
- state: present
-
-- name: Add blackfire.io repository
- apt_repository:
- repo: 'deb http://packages.blackfire.io/debian any main'
- state: present
- update_cache: yes
-
-- name: Install blackfire-php
- apt:
- name: '{{ item }}'
- state: present
- with_items:
- - blackfire-php
-
-- name: Install xdebug
- apt:
- name: php5-xdebug
- update_cache: yes
diff --git a/provision/roles/boilerplate-main-development/tasks/main.yml b/provision/roles/boilerplate-main-development/tasks/main.yml
deleted file mode 100644
index cdf7f81..0000000
--- a/provision/roles/boilerplate-main-development/tasks/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-
-- include: bootstrap.yml
- tags:
- - bootstrap
- when: PROVISION_CONTEXT == "development"
diff --git a/provision/roles/boilerplate-main/defaults/main.yml b/provision/roles/boilerplate-main/defaults/main.yml
deleted file mode 100644
index 88d1b8a..0000000
--- a/provision/roles/boilerplate-main/defaults/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
- PROVISION_CONTEXT: "{{ lookup('env','PROVISION_CONTEXT') }}"
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap.yml b/provision/roles/boilerplate-main/tasks/bootstrap.yml
deleted file mode 100644
index ab72df1..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-
-- include_vars: "/opt/docker/etc/application.{{ PROVISION_CONTEXT }}.yml"
-
-- include: bootstrap/systemUpdate.centos.yml
- when: PROVISION.systemUpdate is defined and PROVISION.systemUpdate and ansible_distribution == 'CentOS'
-
-- include: bootstrap/systemUpdate.ubuntu.yml
- when: PROVISION.systemUpdate is defined and PROVISION.systemUpdate and ansible_distribution == 'Ubuntu'
-
-- include: bootstrap/composer.yml
- when: PROVISION.install.phpComposer is defined and PROVISION.install.phpComposer
-- include: bootstrap/cron.yml
-- include: bootstrap/dnsmasq.yml
- when: DNS is defined
-- include: bootstrap/postfix.yml
- when: MAIL is defined
-
-- include: bootstrap/php.centos.yml
- when: ansible_distribution == 'CentOS'
-
-- include: bootstrap/php.ubuntu.yml
- when: ansible_distribution == 'Ubuntu'
-
-- include: bootstrap/php.yml
-
-- include: bootstrap/web.apache.yml
-- include: bootstrap/web.nginx.yml
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/composer.yml b/provision/roles/boilerplate-main/tasks/bootstrap/composer.yml
deleted file mode 100644
index 3b6c09e..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/composer.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-
-- name: Install composer (phar)
- raw: 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer'
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/cron.yml b/provision/roles/boilerplate-main/tasks/bootstrap/cron.yml
deleted file mode 100644
index f757621..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/cron.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-
-- name: Create link for crontab
- file:
- src: '/opt/docker/etc/cron/crontab'
- dest: '/etc/cron.d/docker-boilerplate'
- state: link
- force: yes
-
-- name: Add newline to crontab
- raw: 'echo >> /opt/docker/etc/crontab'
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/dnsmasq.yml b/provision/roles/boilerplate-main/tasks/bootstrap/dnsmasq.yml
deleted file mode 100644
index 65fed23..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/dnsmasq.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-
-- include_vars: "/opt/docker/etc/application.{{ PROVISION_CONTEXT }}.yml"
-
-- name: Add domains to dnsmasq
- lineinfile:
- dest: "/etc/dnsmasq.d/docker"
- regexp: '^address=/{{ item.domain }}'
- line: 'address=/{{ item.domain }}/{{ item.address }}'
- create: yes
- with_items: "{{ DNS.domain }}"
- when: DNS.domain is defined
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/php.centos.yml b/provision/roles/boilerplate-main/tasks/bootstrap/php.centos.yml
deleted file mode 100644
index 67728cc..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/php.centos.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-
-- name: Create link for additional php.ini
- file:
- src: '/opt/docker/etc/php/php.ini'
- dest: '/etc/php.d/zzz-docker-boilerplate.ini'
- state: link
- force: yes
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/php.ubuntu.yml b/provision/roles/boilerplate-main/tasks/bootstrap/php.ubuntu.yml
deleted file mode 100644
index c9f165b..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/php.ubuntu.yml
+++ /dev/null
@@ -1,29 +0,0 @@
----
-
-- name: Create /etc/php5/mods-available/
- file:
- path: /etc/php5/mods-available/
- state: directory
- mode: 0755
-
-- name: Link php.ini for cli and fpm
- file:
- src: '{{ item.file }}'
- dest: '/etc/php5/{{ item.category }}/conf.d/{{ item.target }}'
- force: yes
- state: link
- with_items:
- # PHP cli
- - { category: 'cli', file: '/etc/php5/mods-available/mcrypt.ini', target: '20-mcrypt.ini' }
- - { category: 'cli', file: '/opt/docker/etc/php/php.ini', target: '99-docker-boilerplate.ini' }
- # PHP fpm
- - { category: 'fpm', file: '/etc/php5/mods-available/mcrypt.ini', target: '20-mcrypt.ini' }
- - { category: 'fpm', file: '/opt/docker/etc/php/php.ini', target: '99-docker-boilerplate.ini' }
-
-- name: Configure php-fpm (php-fpm.conf)
- lineinfile:
- dest: /etc/php5/fpm/php-fpm.conf
- regexp: '^[\s;]*{{ item.key }}[\s]*='
- line: '{{ item.key }} = {{ item.value }}'
- with_items:
- - { key: 'daemonize', value: 'no' }
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/php.yml b/provision/roles/boilerplate-main/tasks/bootstrap/php.yml
deleted file mode 100644
index fbcfea2..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/php.yml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-
-- include_vars: "/opt/docker/etc/application.{{ PROVISION_CONTEXT }}.yml"
-
-- name: Fact - php pool on centos
- set_fact:
- php_pool_conf: /etc/php-fpm.d/www.conf
- when: ansible_distribution == 'CentOS'
-
-- name: Fact - php pool on ubuntu
- set_fact:
- php_pool_conf: /etc/php5/fpm/pool.d/www.conf
- when: ansible_distribution == 'Ubuntu'
-
-- name: Configure php-fpm (pool www.conf)
- lineinfile:
- dest: "{{ php_pool_conf }}"
- regexp: '^[\s;]*{{ item.variable }}[\s]*='
- line: '{{ item.variable }} = {{ item.value }}'
- with_items: "{{ PHP.fpm.conf }}"
- when: PHP.fpm.conf is defined and item.value != ""
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/postfix.yml b/provision/roles/boilerplate-main/tasks/bootstrap/postfix.yml
deleted file mode 100644
index 974d45f..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/postfix.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-
-- name: Configure postfix
- lineinfile:
- dest: /etc/postfix/main.cf
- regexp: '^[\s;]*{{ item.variable }}[\s]*='
- line: '{{ item.variable }} = {{ item.value }}'
- with_items: "{{ MAIL.conf }}"
- when: MAIL.conf is defined and item.value != ""
\ No newline at end of file
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/systemUpdate.centos.yml b/provision/roles/boilerplate-main/tasks/bootstrap/systemUpdate.centos.yml
deleted file mode 100644
index 15f1e0b..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/systemUpdate.centos.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-
-- name: Update system packages (yum) ... will take some time
- yum: name=* state=latest
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/systemUpdate.ubuntu.yml b/provision/roles/boilerplate-main/tasks/bootstrap/systemUpdate.ubuntu.yml
deleted file mode 100644
index f2270d7..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/systemUpdate.ubuntu.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-
-- name: Upgrade system packages (apt-get dist-upgrade) ... will take some time
- apt:
- upgrade: dist
- update_cache: true
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/web.apache.yml b/provision/roles/boilerplate-main/tasks/bootstrap/web.apache.yml
deleted file mode 100644
index a165a19..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/web.apache.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-
-- file:
- path: "/opt/docker/etc/httpd"
- state: directory
-
-- name: Deploy dynamic apache vhost
- template:
- src: ../../templates/apache/vhost.conf.j2
- dest: /opt/docker/etc/httpd/vhost.conf
- owner: root
- group: root
- mode: 0775
diff --git a/provision/roles/boilerplate-main/tasks/bootstrap/web.nginx.yml b/provision/roles/boilerplate-main/tasks/bootstrap/web.nginx.yml
deleted file mode 100644
index 39646e1..0000000
--- a/provision/roles/boilerplate-main/tasks/bootstrap/web.nginx.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-
-- file:
- path: "/opt/docker/etc/nginx"
- state: directory
-
-- name: Deploy dynamic nginx vhost
- template:
- src: ../../templates/nginx/vhost.conf.j2
- dest: /opt/docker/etc/nginx/vhost.conf
- owner: root
- group: root
- mode: 0775
diff --git a/provision/roles/boilerplate-main/tasks/entrypoint.yml b/provision/roles/boilerplate-main/tasks/entrypoint.yml
deleted file mode 100644
index e0224ca..0000000
--- a/provision/roles/boilerplate-main/tasks/entrypoint.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-
-- include: entrypoint/mysql.yml
-- include: entrypoint/php.yml
diff --git a/provision/roles/boilerplate-main/tasks/entrypoint/mysql.yml b/provision/roles/boilerplate-main/tasks/entrypoint/mysql.yml
deleted file mode 100644
index 5422f0e..0000000
--- a/provision/roles/boilerplate-main/tasks/entrypoint/mysql.yml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-
-- name: Deploy root my.cnf
- template:
- src: ../../templates/my.cnf.j2
- dest: /root/.my.cnf
- owner: root
- group: root
- mode: 0644
-
-- name: Deploy user my.cnf
- template:
- src: ../../templates/my.cnf.j2
- dest: /home/.my.cnf
- owner: "{{ lookup('env','APPLICATION_USER') }}"
- group: "{{ lookup('env','APPLICATION_USER') }}"
- mode: 0644
diff --git a/provision/roles/boilerplate-main/tasks/entrypoint/php.yml b/provision/roles/boilerplate-main/tasks/entrypoint/php.yml
deleted file mode 100644
index 8362409..0000000
--- a/provision/roles/boilerplate-main/tasks/entrypoint/php.yml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-
-- include_vars: "/opt/docker/etc/application.{{ PROVISION_CONTEXT }}.yml"
-- include_vars: "/opt/docker/etc/application.environment.yml"
-
-- name: Fact - php pool on centos
- set_fact:
- php_pool_conf: /etc/php-fpm.d/www.conf
- when: ansible_distribution == 'CentOS'
-
-- name: Fact - php pool on ubuntu
- set_fact:
- php_pool_conf: /etc/php5/fpm/pool.d/www.conf
- when: ansible_distribution == 'Ubuntu'
-
-- name: Configure environment variables from DOCKER_ENVIRONMENT for php-fpm (pool www.conf)
- lineinfile:
- dest: "{{ php_pool_conf }}"
- regexp: '^env\[{{ item.key }}\][\s]*='
- line: 'env[{{ item.key }}] = "{{ item.value }}"'
- with_dict: "{{ DOCKER_ENVIRONMENT }}"
- when: DOCKER_ENVIRONMENT is defined and item.value != ''
-
-- name: Set development environment php.ini
- file:
- src: '/opt/docker/etc/php/development.ini'
- dest: '/opt/docker/etc/php/php.ini'
- state: link
- force: yes
- when: PROVISION_CONTEXT == "development" or PROVISION_CONTEXT == ""
-
-- name: Enable production environment php.ini
- file:
- src: '/opt/docker/etc/php/production.ini'
- dest: '/opt/docker/etc/php/php.ini'
- state: link
- force: yes
- when: PROVISION_CONTEXT == "production"
diff --git a/provision/roles/boilerplate-main/tasks/main.yml b/provision/roles/boilerplate-main/tasks/main.yml
deleted file mode 100644
index 7895a52..0000000
--- a/provision/roles/boilerplate-main/tasks/main.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-
-- include: bootstrap.yml
- tags:
- - bootstrap
-
-- include: entrypoint.yml
- tags:
- - entrypoint
diff --git a/provision/roles/boilerplate-main/templates/apache/vhost.conf.j2 b/provision/roles/boilerplate-main/templates/apache/vhost.conf.j2
deleted file mode 100644
index 28346a8..0000000
--- a/provision/roles/boilerplate-main/templates/apache/vhost.conf.j2
+++ /dev/null
@@ -1,28 +0,0 @@
-#######################################
-# Vhost
-#######################################
-{% for vhost in WEB.vhost %}
-
-# Vhost for "{{ vhost.serverName }}"
-
-
- ServerName "{{ vhost.serverName }}"
- ServerAlias "{{ vhost.serverAlias }}"
- DocumentRoot "{{ vhost.documentRoot|default('') }}"
-
- UseCanonicalName Off
-
- Include /opt/docker/etc/httpd/vhost.common.conf
-
-
-
- ServerName "{{ vhost.serverName }}"
- ServerAlias "{{ vhost.serverAlias }}"
- DocumentRoot "{{ vhost.documentRoot|default('') }}"
-
- UseCanonicalName Off
- Include /opt/docker/etc/httpd/vhost.common.conf
- Include /opt/docker/etc/httpd/vhost.ssl.conf
-
-
-{% endfor %}
diff --git a/provision/roles/boilerplate-main/templates/my.cnf.j2 b/provision/roles/boilerplate-main/templates/my.cnf.j2
deleted file mode 100644
index dd22c34..0000000
--- a/provision/roles/boilerplate-main/templates/my.cnf.j2
+++ /dev/null
@@ -1,21 +0,0 @@
-[client]
-host=mysql
-user="root"
-password="{{ lookup('env','MYSQL_ROOT_PASSWORD') }}"
-
-[mysql]
-host=mysql
-user="root"
-password="{{ lookup('env','MYSQL_ROOT_PASSWORD') }}"
-database="{{ lookup('env','MYSQL_DATABASE') }}"
-default-character-set=utf8
-local-infile=1
-show-warnings
-auto-rehash
-sigint-ignore
-reconnect
-
-[mysqldump]
-host=mysql
-user="root"
-password="{{ lookup('env','MYSQL_ROOT_PASSWORD') }}"
diff --git a/provision/roles/boilerplate-main/templates/nginx/vhost.conf.j2 b/provision/roles/boilerplate-main/templates/nginx/vhost.conf.j2
deleted file mode 100644
index e2bbdb5..0000000
--- a/provision/roles/boilerplate-main/templates/nginx/vhost.conf.j2
+++ /dev/null
@@ -1,69 +0,0 @@
-#######################################
-# Vhost
-#######################################
-{% for vhost in WEB.vhost %}
-
-# Vhost for "{{ vhost.serverName }}"
-
-server {
- listen 80;
-
- server_name {{ vhost.serverName }} {{ vhost.serverAlias }};
- access_log /dev/stdout;
- error_log /dev/stdout info;
-
- root "{{ vhost.documentRoot|default('') }}";
- index "{{ vhost.documentIndex|default('') }}";
-
- client_max_body_size 50m;
-
- location / {
- try_files $uri $uri/ /{{ vhost.documentIndex|default('') }}?$query_string;
- }
-
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass php;
- include fastcgi_params;
-
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_read_timeout 1000;
- }
-
- include /opt/docker/etc/nginx/vhost.common.conf;
-}
-
-##############
-# SSL
-##############
-
-server {
- listen 443;
-
- server_name {{ vhost.serverName }} {{ vhost.serverAlias }};
- access_log /dev/stdout;
- error_log /dev/stdout info;
-
- root "{{ vhost.documentRoot|default('') }}";
- index "{{ vhost.documentIndex|default('') }}";
-
- client_max_body_size 50m;
-
- location / {
- try_files $uri $uri/ /{{ vhost.documentIndex|default('') }}?$query_string;
- }
-
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass php;
- include fastcgi_params;
-
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_read_timeout 1000;
- }
-
- include /opt/docker/etc/nginx/vhost.common.conf;
- include /opt/docker/etc/nginx/vhost.ssl.conf;
-}
-
-{% endfor %}