From 2f790b727971bac5b76b58de7fedf1441d1d6821 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Mon, 15 Jun 2015 20:39:24 +0200 Subject: [PATCH 01/16] Added ftp container --- docker/storage/entrypoint.sh | 1 + docker/vsftpd/Dockerfile | 32 ++++++++++++++++++++++ docker/vsftpd/conf/supervisord.conf | 5 ++++ docker/vsftpd/conf/vsftpd.conf | 25 +++++++++++++++++ docker/vsftpd/entrypoint.sh | 42 +++++++++++++++++++++++++++++ 5 files changed, 105 insertions(+) create mode 100644 docker/vsftpd/Dockerfile create mode 100644 docker/vsftpd/conf/supervisord.conf create mode 100644 docker/vsftpd/conf/vsftpd.conf create mode 100755 docker/vsftpd/entrypoint.sh diff --git a/docker/storage/entrypoint.sh b/docker/storage/entrypoint.sh index 180c70b..20c31ab 100755 --- a/docker/storage/entrypoint.sh +++ b/docker/storage/entrypoint.sh @@ -6,6 +6,7 @@ mkdir -p /data/solr/ mkdir -p /data/dns/ +mkdir -p /data/ftp/ mkdir -p /data/cache/ find /data/ -type d -print0 | xargs -0 --no-run-if-empty chmod 777 diff --git a/docker/vsftpd/Dockerfile b/docker/vsftpd/Dockerfile new file mode 100644 index 0000000..e76a37c --- /dev/null +++ b/docker/vsftpd/Dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:14.04 + +ENV VSFTP_USER dev +ENV VSFTP_PASSWORD dev +ENV VSFTP_PATH /data/ftp/ + +RUN apt-get update && \ + apt-get install -y vsftpd supervisor net-tools + +RUN mkdir -p /var/run/vsftpd/empty +RUN mkdir -p /var/log/supervisor + +COPY entrypoint.sh /entrypoint.sh +COPY conf/supervisord.conf /etc/supervisor/conf.d/supervisord.conf +COPY conf/vsftpd.conf /etc/vsftpd.conf + +RUN mkdir -p /data/ftp/ + +VOLUME "/data/ftp/" + +EXPOSE 20 +EXPOSE 21 +EXPOSE 12020 +EXPOSE 12021 +EXPOSE 12022 +EXPOSE 12023 +EXPOSE 12024 +EXPOSE 12025 + +ENTRYPOINT ["/entrypoint.sh"] + +CMD ["supervisord"] diff --git a/docker/vsftpd/conf/supervisord.conf b/docker/vsftpd/conf/supervisord.conf new file mode 100644 index 0000000..e8c3b1e --- /dev/null +++ b/docker/vsftpd/conf/supervisord.conf @@ -0,0 +1,5 @@ +[supervisord] +nodaemon=true + +[program:vsftpd] +command=vsftpd diff --git a/docker/vsftpd/conf/vsftpd.conf b/docker/vsftpd/conf/vsftpd.conf new file mode 100644 index 0000000..cd88779 --- /dev/null +++ b/docker/vsftpd/conf/vsftpd.conf @@ -0,0 +1,25 @@ +listen=YES +anonymous_enable=NO +local_enable=YES +write_enable=YES +anon_upload_enable=NO +anon_mkdir_write_enable=NO +dirmessage_enable=YES +use_localtime=YES +xferlog_enable=YES +connect_from_port_20=YES +secure_chroot_dir=/var/run/vsftpd/empty +pam_service_name=vsftpd +rsa_cert_file=/etc/ssl/private/vsftpd.pem +max_per_ip=100 +max_clients=100 + +pasv_min_port=12020 +pasv_max_port=12025 + +file_open_mode=0666 +local_umask=000 + +allow_writeable_chroot=YES +vsftpd_log_file=/var/log/vsftpd.log +background=NO diff --git a/docker/vsftpd/entrypoint.sh b/docker/vsftpd/entrypoint.sh new file mode 100755 index 0000000..7025d88 --- /dev/null +++ b/docker/vsftpd/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -e + +############################# +## USER +############################# + +mkdir -p "${FTP_PATH}" + +if ( id "${FTP_USER}" ); then + echo "User ${FTP_USER} already exists" +else + echo "Creating user and group ${FTP_USER}" + ENC_PASS=$(perl -e 'print crypt($ARGV[0], "password")' "${FTP_PASSWORD}") + groupadd -g "${EFFECTIVE_GID}" "${FTP_USER}" + useradd -d "${FTP_PATH}" -m -p "${ENC_PASS}" -u "${EFFECTIVE_UID}" --gid "${FTP_USER}" -s /bin/sh "${FTP_USER}" +fi + +############################# +## COMMAND +############################# + +case "$1" in + + ## Supervisord (start daemons) + supervisord) + ## Register IP + ETH0_IP=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}') + mkdir -p /data/dns/ + chmod 777 /data/dns/ + echo "${ETH0_IP}" > /data/dns/ftp.ip + echo "${ETH0_IP} ftp ftp_1" > /data/dns/ftp.hosts + + ## Start services + exec supervisord + ;; + + ## All other commands + *) + exec "$@" + ;; +esac From 1ba51e1c0b6d6aecd6014c57570ef790ead7c6e6 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Mon, 15 Jun 2015 20:39:40 +0200 Subject: [PATCH 02/16] Added php mopdule mcrypt --- docker/main/bin/install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/main/bin/install.sh b/docker/main/bin/install.sh index 29932a8..afa5da7 100644 --- a/docker/main/bin/install.sh +++ b/docker/main/bin/install.sh @@ -77,6 +77,9 @@ locale-gen touch /etc/php5/mods-available/docker-boilerplate.ini php5enmod docker-boilerplate +# enable ext mcrypt +php5enmod mcrypt + ############################# # Composer ############################# From 66fa99359699436514a7e431758981fe5275160e Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Mon, 15 Jun 2015 20:39:51 +0200 Subject: [PATCH 03/16] Added ftp container --- docker-compose.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 9b08b2a..c0fc90d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -110,6 +110,19 @@ mysql: # env_file: # - docker-env.yml +####################################### +# FTP (vsftpd) +####################################### +#ftp: +# build: docker/vsftpd/ +# volumes_from: +# - storage +# volumes: +# - ./:/docker/ +# - /tmp/debug/:/tmp/debug/ +# env_file: +# - docker-env.yml + ####################################### # Storage ####################################### From 8e7da120a197797ca8ca6ea146670848cfac9c43 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Mon, 15 Jun 2015 20:39:59 +0200 Subject: [PATCH 04/16] Updated env file --- docker-env.yml | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/docker-env.yml b/docker-env.yml index ac9f0e3..9633e43 100644 --- a/docker-env.yml +++ b/docker-env.yml @@ -1,3 +1,11 @@ +####################################### +# Environment Configuration +# - feel free to edit - +####################################### + +####################################### +# Webserver + # Settings: TYPO3 CMS DOCUMENT_ROOT=code/ DOCUMENT_INDEX=index.php @@ -13,34 +21,50 @@ CLI_SCRIPT=php typo3/cli_dispatch.phpsh #DOCUMENT_INDEX=app_dev.php #CLI_SCRIPT=php app/console -# Contexts environment +####################################### +# Context environment TYPO3_CONTEXT=Development/Docker FLOW_CONTEXT=Development/Docker FLOW_REWRITEURLS=1 SYMFONY_ENV=dev SYMFONY_DEBUG=0 -# Mail - Vagrant mail sandbox +####################################### +# Mail + +# Vagrant mail sandbox MAIL_GATEWAY=192.168.56.2 -# Mail - Mailcatcher +# Mailcatcher (container) #MAIL_GATEWAY=mail:1025 -# Service settings +####################################### +# Internal dns routing DNS_DOMAIN=vm vm.dev +####################################### # MySQL settings MYSQL_ROOT_PASSWORD=dev MYSQL_USER=dev MYSQL_PASSWORD=dev MYSQL_DATABASE=typo3 +####################################### +# FTP settings +FTP_USER=dev +FTP_PASSWORD=dev +FTP_PATH=/data/ftp/ +#FTP_PATH=/docker/code/ + +####################################### # PHP Settings PHP_TIMEZONE=UTC +####################################### # Permission settings EFFECTIVE_UID=1000 EFFECTIVE_GID=1000 +####################################### # Default cli user (should be www-data) CLI_USER=www-data From 4bb363aa6059b6f8eb4b12bf87597fb6045b28df Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Mon, 15 Jun 2015 20:40:22 +0200 Subject: [PATCH 05/16] Added ftp, Added customize.md --- README.md | 4 +++- documentation/CUSTOMIZE.md | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 documentation/CUSTOMIZE.md diff --git a/README.md b/README.md index e984e16..1b29833 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/mblaschke/typo3-docker-boilerplate.svg)](http://isitmaintained.com/project/mblaschke/typo3-docker-boilerplate "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/mblaschke/typo3-docker-boilerplate.svg)](http://isitmaintained.com/project/mblaschke/typo3-docker-boilerplate "Percentage of issues still open") -This is an easy customizable docker boilerplate for any PHP based projects like _TYPO3 CMS_, _TYPO3 NEOS_, _TYPO3 FLOW_, _Symfony Framework_ and many other. +This is an easy customizable docker boilerplate for any PHP based projects like _TYPO3 CMS_, _Symfony Framework_, _FLOW/NEOS_ and many other frameworks or applications. Supports: @@ -17,6 +17,7 @@ Supports: - Redis (disabled) - Memcached (disabled) - Mailcatcher (if no mail sandbox is used, eg. [Vagrant Development VM](https://github.com/mblaschke/vagrant-development)) +- FTP server (vsftpd) - Support for `TYPO3_CONTEXT` and `FLOW_CONTEXT` for TYPO3, FLOW, NEOS. - maybe more later... @@ -34,6 +35,7 @@ Use can use my [Vagrant Development VM](https://github.com/mblaschke/vagrant-dev - [Installation and requirements](/documentation/INSTALL.md) - [Updating docker boilerplate](/documentation/UPDATE.md) +- [Customizing](/documentation/CUSTOMIZE.md) - [Docker Quickstart](/documentation/DOCKER-QUICKSTART.md) - [Run your project](/documentation/DOCKER-STARTUP.md) - [Container detail info](/documentation/DOCKER-INFO.md) diff --git a/documentation/CUSTOMIZE.md b/documentation/CUSTOMIZE.md new file mode 100644 index 0000000..c07da60 --- /dev/null +++ b/documentation/CUSTOMIZE.md @@ -0,0 +1,21 @@ +[<-- Back to main section](../README.md) + +# Customizing + +## Custom packages (`main` controller) + +You can add custom shell commands in `docker/main/bin/customization.sh` + + +## Custom php.ini directives + +Modify the `docker/main/conf/php.ini`, it will be added on top of the default php.ini so +you can overwrite any directives. + +After modification rebuild your `main` container: + +```bash +docker-compose stop +docker-compose build main +docker-compose up -d +``` From 98b8efe0cd675360d642b898c1f9ffc985eb5a7a Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Mon, 15 Jun 2015 20:40:36 +0200 Subject: [PATCH 06/16] Updated docker info with ftp info --- documentation/DOCKER-INFO.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/documentation/DOCKER-INFO.md b/documentation/DOCKER-INFO.md index e0e0349..574c9ad 100644 --- a/documentation/DOCKER-INFO.md +++ b/documentation/DOCKER-INFO.md @@ -104,6 +104,16 @@ Host | mail SMTP port | 1025 Web port | 1080 +### FTP + +Setting | Value +------------- | ------------- +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) + ## Environment settings Environment | Description From 499720424b3ef79f68b7fa521a8f53b3f02eb5c2 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Mon, 15 Jun 2015 20:40:42 +0200 Subject: [PATCH 07/16] Updated changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a06048e..23ac057 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ TYPO3 Docker Boilerplate Changelog ================================== +3.5.0 - 2015-06-15 +----------------------- +- Added `ftp` container (with vsftpd) +- Enabled php module `mcrypt` by default +- Improved documentation + 3.4.0 - 2015-06-15 ------------------------------------- - Renamed `PHP_UID` and `PHP_GID` to `EFFECTIVE_UID` and `EFFECTIVE_GID` From c71678770399a835dc28f023702d318d3d5b877d Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Mon, 15 Jun 2015 21:08:43 +0200 Subject: [PATCH 08/16] Added docker image informations Fixes #62 --- documentation/DOCKER-INFO.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/documentation/DOCKER-INFO.md b/documentation/DOCKER-INFO.md index 574c9ad..d01cfb6 100644 --- a/documentation/DOCKER-INFO.md +++ b/documentation/DOCKER-INFO.md @@ -14,9 +14,25 @@ solr (optional) | Apache Solr server elasticsearch (optional) | Elasticsearch server memcached (optional) | Memcached server redis (optional) | Redis server +ftps (optional) | FTP server (vsftpd) +mailcatcher (optional) | Mailserver with easy web and REST interface for mailing This directory will be mounted under `/docker` in `main` and `web` container. +## Docker images +Container | Source +------------------------- | ------------------------------- +main | [Ubuntu](https://registry.hub.docker.com/_/ubuntu/) *official* +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* +solr (optional) | [Solr](https://registry.hub.docker.com/u/guywithnose/solr/) from _guywithnose_ +elasticsearch (optional) | [Elasticsearch](https://registry.hub.docker.com/_/elasticsearch/) *official* +memcached (optional) | [Memcached](https://registry.hub.docker.com/_/memcached/) *official* +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_ + ## Makefile Customize the [Makefile](Makefile) for your needs. From caa5341cc41f349fb11bf013db709788e3a73462 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Mon, 15 Jun 2015 21:13:27 +0200 Subject: [PATCH 09/16] Updated elasticsearch docker image --- docker/elasticsearch/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/elasticsearch/Dockerfile b/docker/elasticsearch/Dockerfile index 6dee123..1d6d195 100644 --- a/docker/elasticsearch/Dockerfile +++ b/docker/elasticsearch/Dockerfile @@ -1,2 +1 @@ -FROM dockerfile/elasticsearch - +FROM elasticsearch From 6fba4cb37648dce48a8ea8f996b2085ee593c2c0 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Tue, 16 Jun 2015 09:18:17 +0200 Subject: [PATCH 10/16] Added ftp link to main container (optional) --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index c0fc90d..877d02d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ main: #- elasticsearch #- redis #- memcached + #- ftp volumes: - ./:/docker/ - /tmp/debug/:/tmp/debug/ From a68391ca85103753684930f18914cc1e9988bdd2 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Wed, 17 Jun 2015 12:32:40 +0200 Subject: [PATCH 11/16] Updated INSTALL --- documentation/INSTALL.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/documentation/INSTALL.md b/documentation/INSTALL.md index a2a0a19..8d16ba9 100644 --- a/documentation/INSTALL.md +++ b/documentation/INSTALL.md @@ -15,12 +15,17 @@ the much faster virtualisation (networking, disk access, shared folders) compare There is also a [Vagrant VM for VirtualBox, VMware and Parallels](https://github.com/mblaschke/vagrant-development) 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/mblaschke/clitools) (will also run on native Linux, not only inside a Vagrant box) ## First startup ```bash -git clone https://github.com/mblaschke/TYPO3-docker-boilerplate.git projectname +git clone --recursive https://github.com/mblaschke/TYPO3-docker-boilerplate.git projectname cd projectname From e52b570db83c1161df31d4334aa08966d115c533 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Wed, 17 Jun 2015 12:33:58 +0200 Subject: [PATCH 12/16] Fixed style --- documentation/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/INSTALL.md b/documentation/INSTALL.md index 8d16ba9..8b6cc17 100644 --- a/documentation/INSTALL.md +++ b/documentation/INSTALL.md @@ -15,7 +15,7 @@ the much faster virtualisation (networking, disk access, shared folders) compare There is also a [Vagrant VM for VirtualBox, VMware and Parallels](https://github.com/mblaschke/vagrant-development) 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 +_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. From 0bd59f6cdb432e76484adb7967be927ade8869ed Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Wed, 17 Jun 2015 21:21:44 +0200 Subject: [PATCH 13/16] Added postgresql Fixes #63 --- README.md | 1 + docker-compose.yml | 13 +++++++++++++ docker-env.yml | 5 +++++ docker/postgres/Dockerfile | 1 + documentation/DOCKER-INFO.md | 12 ++++++++++++ 5 files changed, 32 insertions(+) create mode 100644 docker/postgres/Dockerfile diff --git a/README.md b/README.md index 1b29833..ccec5ba 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Supports: - Nginx or Apache HTTPd - PHP-FPM (with Xdebug) - MySQL, MariaDB or PerconaDB +- PostgreSQL - Solr (disabled, with TYPO3 CMS EXT:solr configuration as example) - Elasticsearch (disabled, without configuration) - Redis (disabled) diff --git a/docker-compose.yml b/docker-compose.yml index 877d02d..36b1455 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,7 @@ main: build: docker/main/ links: - mysql + #- postgres #- mail #- solr #- elasticsearch @@ -54,6 +55,18 @@ mysql: env_file: - docker-env.yml +####################################### +# PostgreSQL server +####################################### +#postgres: +# build: docker/postgres/ +# ports: +# - 15432:5432 +# volumes_from: +# - storage +# env_file: +# - docker-env.yml + ####################################### # Solr server ####################################### diff --git a/docker-env.yml b/docker-env.yml index 9633e43..4047a07 100644 --- a/docker-env.yml +++ b/docker-env.yml @@ -49,6 +49,11 @@ MYSQL_USER=dev MYSQL_PASSWORD=dev MYSQL_DATABASE=typo3 +####################################### +# PostgreSQL settings +POSTGRES_USER=dev +POSTGRES_PASSWORD=dev + ####################################### # FTP settings FTP_USER=dev diff --git a/docker/postgres/Dockerfile b/docker/postgres/Dockerfile new file mode 100644 index 0000000..de887ed --- /dev/null +++ b/docker/postgres/Dockerfile @@ -0,0 +1 @@ +FROM postgres:9.4 diff --git a/documentation/DOCKER-INFO.md b/documentation/DOCKER-INFO.md index d01cfb6..566936d 100644 --- a/documentation/DOCKER-INFO.md +++ b/documentation/DOCKER-INFO.md @@ -10,6 +10,7 @@ main | Main container with PHP-FPM and tools (your entrypoi 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 elasticsearch (optional) | Elasticsearch server memcached (optional) | Memcached server @@ -26,6 +27,7 @@ main | [Ubuntu](https://registry.hub.docker.com/_/ubuntu/) 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_ elasticsearch (optional) | [Elasticsearch](https://registry.hub.docker.com/_/elasticsearch/) *official* memcached (optional) | [Memcached](https://registry.hub.docker.com/_/memcached/) *official* @@ -83,6 +85,16 @@ External Port | 13306 Access fo MySQL user "root" and "dev" will be allowed from external hosts (eg. for debugging, dumps and other stuff). +### PostgreSQL + +Setting | Value +------------- | ------------- +User | dev (if not changed in env) +Password | dev (if not changed in env) +Host | postgres:5432 +External Port | 15432 + + ### Solr Setting | Value From e05333c73aea9e9139fca8139802f9a56334803b Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Wed, 17 Jun 2015 21:42:54 +0200 Subject: [PATCH 14/16] Added postgres vars for apache/nginx/php --- docker/httpd/conf/vhost.conf | 3 +++ docker/httpd/entrypoint.sh | 3 +++ docker/nginx/conf/vhost.conf | 6 ++++++ docker/nginx/entrypoint.sh | 3 +++ 4 files changed, 15 insertions(+) diff --git a/docker/httpd/conf/vhost.conf b/docker/httpd/conf/vhost.conf index 03ce65c..2eee222 100644 --- a/docker/httpd/conf/vhost.conf +++ b/docker/httpd/conf/vhost.conf @@ -35,6 +35,9 @@ SetEnv MYSQL_ROOT_USER "root" SetEnv MYSQL_ROOT_PASSWORD "" SetEnv MYSQL_DATABASE "" +SetEnv POSTGRES_USER "" +SetEnv POSTGRES_PASSWORD "" + DirectoryIndex index.html index.htm DocumentRoot "" diff --git a/docker/httpd/entrypoint.sh b/docker/httpd/entrypoint.sh index 2f910a0..e8900cf 100755 --- a/docker/httpd/entrypoint.sh +++ b/docker/httpd/entrypoint.sh @@ -54,6 +54,9 @@ cp /usr/local/apache2/conf/.docker-vhost.conf.original /usr/local/apache /bin/sed -i "s@@${MYSQL_ROOT_PASSWORD}@" /usr/local/apache2/conf/docker-vhost.conf /bin/sed -i "s@@${MYSQL_DATABASE}@" /usr/local/apache2/conf/docker-vhost.conf +/bin/sed -i "s@@${POSTGRES_USER}@" /usr/local/apache2/conf/docker-vhost.conf +/bin/sed -i "s@@${POSTGRES_PASSWORD}@" /usr/local/apache2/conf/docker-vhost.conf + ############################# ## COMMAND ############################# diff --git a/docker/nginx/conf/vhost.conf b/docker/nginx/conf/vhost.conf index 7a953cb..218ecd7 100644 --- a/docker/nginx/conf/vhost.conf +++ b/docker/nginx/conf/vhost.conf @@ -32,6 +32,9 @@ server { fastcgi_param MYSQL_ROOT_PASSWORD ""; fastcgi_param MYSQL_DATABASE ""; + fastcgi_param POSTGRES_USER ""; + fastcgi_param POSTGRES_PASSWORD ""; + fastcgi_read_timeout 1000; } } @@ -78,6 +81,9 @@ server { fastcgi_param MYSQL_ROOT_PASSWORD ""; fastcgi_param MYSQL_DATABASE ""; + fastcgi_param POSTGRES_USER ""; + fastcgi_param POSTGRES_PASSWORD ""; + fastcgi_read_timeout 1000; } } diff --git a/docker/nginx/entrypoint.sh b/docker/nginx/entrypoint.sh index 3b45f44..fd78df4 100755 --- a/docker/nginx/entrypoint.sh +++ b/docker/nginx/entrypoint.sh @@ -38,6 +38,9 @@ cp /opt/docker/vhost.conf /etc/nginx/conf.d/vhost.conf /bin/sed -i "s@@${MYSQL_ROOT_PASSWORD}@" /etc/nginx/conf.d/vhost.conf /bin/sed -i "s@@${MYSQL_DATABASE}@" /etc/nginx/conf.d/vhost.conf +/bin/sed -i "s@@${POSTGRES_USER}@" /etc/nginx/conf.d/vhost.conf +/bin/sed -i "s@@${POSTGRES_PASSWORD}@" /etc/nginx/conf.d/vhost.conf + ############################# ## COMMAND ############################# From dc8522576e779efffc2a743d8920f205315e0a4e Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Sun, 21 Jun 2015 12:15:44 +0200 Subject: [PATCH 15/16] Added better documentation --- docker-env.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/docker-env.yml b/docker-env.yml index 4047a07..6351ec0 100644 --- a/docker-env.yml +++ b/docker-env.yml @@ -1,26 +1,29 @@ ####################################### # Environment Configuration # - feel free to edit - +# -> for most changes you only have to +# docker-compose up -d +# to apply them ####################################### ####################################### # Webserver -# Settings: TYPO3 CMS +# TYPO3 CMS DOCUMENT_ROOT=code/ DOCUMENT_INDEX=index.php CLI_SCRIPT=php typo3/cli_dispatch.phpsh -# Settings: NEOS or FLOW -#DOCUMENT_ROOT=code/Web/ -#DOCUMENT_INDEX=index.php -#CLI_SCRIPT=php flow - -# Settings: SYMFONY FRAMEWORK +# SYMFONY FRAMEWORK #DOCUMENT_ROOT=code/web/ #DOCUMENT_INDEX=app_dev.php #CLI_SCRIPT=php app/console +# NEOS or FLOW +#DOCUMENT_ROOT=code/Web/ +#DOCUMENT_INDEX=index.php +#CLI_SCRIPT=php flow + ####################################### # Context environment TYPO3_CONTEXT=Development/Docker @@ -44,6 +47,12 @@ DNS_DOMAIN=vm vm.dev ####################################### # MySQL settings +# -> if you change these settings +# you have to remove the database: +# docker-compose rm mysql +# because it's stored database in +# volume and provisioning is only +# done once. MYSQL_ROOT_PASSWORD=dev MYSQL_USER=dev MYSQL_PASSWORD=dev From eeaeaa087e3c15a104a6d4d3984d194240c13a03 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Tue, 23 Jun 2015 12:41:45 +0200 Subject: [PATCH 16/16] Version bump 3.5.0 --- CHANGELOG.md | 3 ++- README.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23ac057..b217093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ TYPO3 Docker Boilerplate Changelog ================================== -3.5.0 - 2015-06-15 +3.5.0 - 2015-06-23 ----------------------- - Added `ftp` container (with vsftpd) +- Added `postgres` container (with PostgreSQL) - Enabled php module `mcrypt` by default - Improved documentation diff --git a/README.md b/README.md index ccec5ba..ef5f6d5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Dockerized PHP web project boilerplate -![latest v3.4.0](https://img.shields.io/badge/latest-v3.4.0-green.svg?style=flat) +![latest v3.5.0](https://img.shields.io/badge/latest-v3.5.0-green.svg?style=flat) ![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/mblaschke/typo3-docker-boilerplate.svg)](http://isitmaintained.com/project/mblaschke/typo3-docker-boilerplate "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/mblaschke/typo3-docker-boilerplate.svg)](http://isitmaintained.com/project/mblaschke/typo3-docker-boilerplate "Percentage of issues still open")