From 760322e55f75cd00d8e243c19fb5df0797939df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Camilo?= Date: Tue, 21 Nov 2017 15:21:50 +0000 Subject: [PATCH 1/8] turn URL config independent from SSL var --- README.md | 2 +- bin/docker-entrypoint.sh | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4a3eb8b..151215b 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Passbolt docker image provides several environment variables to configure differ * SALT: a random string used by cakephp in security hashing methods * CIPHERSEED: a random string used by cakephp to encrypt/decrypt strings -* URL: URL of the passbolt installation (defaults to passbolt.local) +* URL: URL of the passbolt installation (defaults to http://passbolt.local) ### Database variables diff --git a/bin/docker-entrypoint.sh b/bin/docker-entrypoint.sh index 0a52c03..b0b2312 100755 --- a/bin/docker-entrypoint.sh +++ b/bin/docker-entrypoint.sh @@ -45,16 +45,13 @@ core_setup() { local default_salt='DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi' local default_seed='76859309657453542496749683645' - local default_url='passbolt.local' + local default_url='http://passbolt.local' cp $core_config{.default,} sed -i s:$default_salt:${SALT:-$default_salt}:g $core_config sed -i s:$default_seed:${CIPHERSEED:-$default_seed}:g $core_config sed -i "/example.com/ s:\/\/::" $core_config - sed -i s:example.com:${URL:-$default_url}:g $core_config - if [ "${SSL:-true}" != false ]; then - sed -i s:http:https:g $core_config - fi + sed -i "s|http://example.com|${URL:-$default_url}|g" $core_config } db_setup() { From 17cd822b75d6ac45a405d65f0ca4de9b187616b7 Mon Sep 17 00:00:00 2001 From: Adam McMaster Date: Fri, 24 Nov 2017 15:16:24 +0000 Subject: [PATCH 2/8] Set the default MySQL port to 3306 --- bin/docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/docker-entrypoint.sh b/bin/docker-entrypoint.sh index 0a52c03..8868b81 100755 --- a/bin/docker-entrypoint.sh +++ b/bin/docker-entrypoint.sh @@ -149,7 +149,7 @@ install() { local database_user=${DB_USER:-$(cat $db_config | grep -m1 "'login'" | sed -r "s/\s*'login' => '(.*)',/\1/")} local database_pass=${DB_PASS:-$(cat $db_config | grep -m1 "'password'" | sed -r "s/\s*'password' => '(.*)',/\1/")} local database_name=${DB_NAME:-$(cat $db_config | grep -m1 "'database'" | sed -r "s/\s*'database' => '(.*)',/\1/")} - tables=$(mysql -u ${database_user:-passbolt} -h $database_host -P $database_port -p -BN -e "SHOW TABLES FROM ${database_name:-passbolt}" -p${database_pass:-P4ssb0lt} |wc -l) + tables=$(mysql -u ${database_user:-passbolt} -h $database_host -P ${database_port:-3306} -p -BN -e "SHOW TABLES FROM ${database_name:-passbolt}" -p${database_pass:-P4ssb0lt} |wc -l) if [ $tables -eq 0 ]; then su -c "/var/www/passbolt/app/Console/cake install --send-anonymous-statistics true --no-admin" -ls /bin/bash nginx From 12945dad928708f547340a1c05ab79793ce50edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Zettergren?= Date: Thu, 4 Jan 2018 21:47:35 +0100 Subject: [PATCH 3/8] Add environment variable to set email client The 'client' setting control what the Smtp client sends as EHLO/HELO message to the smtp-server, this change allows the behaviour to be controlled via environment variable instead of having to mount your own email.php file. This change requires that https://github.com/passbolt/passbolt_api/pull/209 is merged. --- README.md | 1 + bin/docker-entrypoint.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a3eb8b..5f97d5d 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ Passbolt docker image provides several environment variables to configure differ * EMAIL_AUTH: disable smtp auth ( defaults to true) * EMAIL_USERNAME: username for email server auth ( defaults to email_user) * EMAIL_PASSWORD: password for email server auth ( defaults to email_password) +* EMAIL_CLIENT: hostname to send as smtp helo ( defaults to null) * EMAIL_TLS: set tls, boolean ( defaults to false) ## Advanced configuration diff --git a/bin/docker-entrypoint.sh b/bin/docker-entrypoint.sh index 0a52c03..6546598 100755 --- a/bin/docker-entrypoint.sh +++ b/bin/docker-entrypoint.sh @@ -109,6 +109,7 @@ email_setup() { # EMAIL_AUTH # EMAIL_USERNAME # EMAIL_PASSWORD + # EMAIL_CLIENT # EMAIL_TLS local default_transport='Smtp' @@ -118,6 +119,7 @@ email_setup() { local default_timeout='30' local default_username="''" local default_password="''" + local default_client=null cp $email_config{.default,} sed -i s:$default_transport:${EMAIL_TRANSPORT:-Smtp}:g $email_config @@ -132,7 +134,9 @@ email_setup() { sed -i "0,/"$default_username"/s:"$default_username":'${EMAIL_USERNAME:-email_user}':" $email_config sed -i "0,/"$default_password"/s:"$default_password":'${EMAIL_PASSWORD:-email_password}':" $email_config fi - + if [ -n "$EMAIL_CLIENT" ] ; then + sed -i "0,/"$default_client"/s:"$default_client":'$EMAIL_CLIENT':" $email_config + fi sed -i "0,/tls/s:false:${EMAIL_TLS:-false}:" $email_config } From d1c735c1f88ea2291476aff9e76c1204778dfdbb Mon Sep 17 00:00:00 2001 From: Diego Lendoiro Date: Sun, 14 Jan 2018 17:02:40 +0100 Subject: [PATCH 4/8] added coreutils. Fixes #75 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index fc8bd9f..370d8c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,6 +38,7 @@ ARG PHP_GNUPG_DEPS="php5-dev \ RUN apk add --no-cache $BASE_PHP_DEPS \ sed \ + coreutils \ tar \ bash \ curl \ From ee0f8fd448e8f5746dc619ec18cd9daef22625c1 Mon Sep 17 00:00:00 2001 From: Diego Lendoiro Date: Sun, 14 Jan 2018 17:08:07 +0100 Subject: [PATCH 5/8] version bump v1.6.9 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 370d8c3..162c763 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:3.6 LABEL maintainer="diego@passbolt.com" -ENV PASSBOLT_VERSION 1.6.5 +ENV PASSBOLT_VERSION 1.6.9 ENV PASSBOLT_URL https://github.com/passbolt/passbolt_api/archive/v${PASSBOLT_VERSION}.tar.gz ARG BASE_PHP_DEPS="php5-curl \ From afcade9bac0065735973022727a98e165b03abd3 Mon Sep 17 00:00:00 2001 From: Diego Lendoiro Date: Sun, 14 Jan 2018 17:49:17 +0100 Subject: [PATCH 6/8] added check for permissions and ownership. Fixes #67 --- bin/docker-entrypoint.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/docker-entrypoint.sh b/bin/docker-entrypoint.sh index 217766d..b7a52b6 100755 --- a/bin/docker-entrypoint.sh +++ b/bin/docker-entrypoint.sh @@ -166,6 +166,12 @@ php_fpm_setup() { sed -i '/^include\s/ s:^:#:' /etc/php5/fpm.d/www.conf } +check_permissions() { + chown -R nginx:nginx /var/www/passbolt + chmod -R +w /var/www/passbolt/app/tmp + chmod +w /var/www/passbolt/app/webroot/img/public +} + email_cron_job() { local root_crontab='/etc/crontabs/root' local cron_task_dir='/etc/periodic/1min' @@ -184,7 +190,6 @@ email_cron_job() { crond -f -c /etc/crontabs & } - if [ ! -f $gpg_private_key ] && [ ! -L $gpg_private_key ] || \ [ ! -f $gpg_public_key ] && [ ! -L $gpg_public_key ]; then gpg_gen_key @@ -213,6 +218,8 @@ if [ ! -f $ssl_key ] && [ ! -L $ssl_key ] && \ gen_ssl_cert fi +check_permissions + php_fpm_setup install From bcf9d88ebc6567aa032539656152eb1cddd74d18 Mon Sep 17 00:00:00 2001 From: Diego Lendoiro Date: Sun, 14 Jan 2018 17:50:02 +0100 Subject: [PATCH 7/8] removed large_client_header_buffers to default. Fixes #59 --- conf/passbolt.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/passbolt.conf b/conf/passbolt.conf index c48a17a..fb8b961 100644 --- a/conf/passbolt.conf +++ b/conf/passbolt.conf @@ -4,7 +4,6 @@ server { client_body_buffer_size 100K; client_header_buffer_size 1k; client_max_body_size 100k; - large_client_header_buffers 2 1k; client_body_timeout 10; client_header_timeout 10; From a8ee1deb4a20dbe8c09a73c32b3136831095452d Mon Sep 17 00:00:00 2001 From: Diego Lendoiro Date: Sun, 14 Jan 2018 18:02:12 +0100 Subject: [PATCH 8/8] updated changelog --- CHANGELOG.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9db742f..9cff732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,22 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [Unreleased](https://github.com/passbolt/passbolt_docker/compare/v1.6.5+1...HEAD) +## [Unreleased](https://github.com/passbolt/passbolt_docker/compare/v1.6.9...HEAD) + +## [1.6.9](https://github.com/passbolt/passbolt_docker/compare/v1.6.5+1...v1.6.9) - 2018-01-14 + +This release provides the last passbolt_api 1.x series release along with several pull requests +and fixes. + +### Fixed + +- Unable to access default installation with http [#59](https://github.com/passbolt/passbolt_docker/issues/59) +- Check and correct the permissions and ownership of /var/www/passbolt [#67](https://github.com/passbolt/passbolt_docker/issues/67) +- cp: Unrecognized option -T [#75](https://github.com/passbolt/passbolt_docker/issues/75) +- turn URL config independent from SSL var [#76](https://github.com/passbolt/passbolt_docker/pull/76) +- Set the default MySQL port to 3306 [#77](https://github.com/passbolt/passbolt_docker/pull/77) +- Add environment variable to set email client [#81](https://github.com/passbolt/passbolt_docker/pull/81) + ## [1.6.5+1](https://github.com/passbolt/passbolt_docker/compare/v1.6.5...v1.6.5+1) - 2017-11-14