Skip to content

Commit cf7aebf

Browse files
committed
Merge branch 'release/v3.7.5'
2 parents 0ef3be2 + fca6f21 commit cf7aebf

File tree

8 files changed

+75
-23
lines changed

8 files changed

+75
-23
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ src
3434
.ruby-version
3535

3636
.bundle
37+
docker-compose/.env

CHANGELOG.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,23 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [Unreleased](https://github.com/passbolt/passbolt_docker/compare/v3.7.3...HEAD)
5+
## [Unreleased](https://github.com/passbolt/passbolt_docker/compare/v3.7.5...HEAD)
6+
7+
## [3.7.5](https://github.com/passbolt/passbolt_docker/compare/v3.7.4...v3.7.5) - 2022-12-01
8+
9+
### Added
10+
11+
- Improved logging for cron tasks
12+
13+
## [3.7.4](https://github.com/passbolt/passbolt_docker/compare/v3.7.3...v3.7.4) - 2022-11-17
14+
15+
### Added
16+
17+
- Directory sync commands on docker-compose pro
18+
19+
### Fixed
20+
21+
- Multiple merge request from community. Thanks a lot to all of you who contributed!
622

723
## [3.7.3](https://github.com/passbolt/passbolt_docker/compare/v3.0.2...v3.7.3) - 2022-11-04
824

@@ -15,7 +31,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1531
- Add new subscription file machinery
1632
- Add pro dependencies
1733

18-
### Changed
34+
### Changed
1935
- Default key length from 2048 to 3072
2036
- Bump php version to 8 on dev Dockerfile
2137
- PB-14373 fix composer files

debian/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@ RUN apt-get update \
3535
&& sed -i '/listen \[\:\:\]\:443 ssl http2;/a listen 443 ssl http2;' /etc/nginx/snippets/passbolt-ssl.conf \
3636
&& sed -i 's,__CERT_PATH__,/etc/ssl/certs/certificate.crt;,' /etc/nginx/snippets/passbolt-ssl.conf \
3737
&& sed -i 's,__KEY_PATH__,/etc/ssl/certs/certificate.key;,' /etc/nginx/snippets/passbolt-ssl.conf \
38-
&& sed -i 's,www-data.*$,www-data exec /bin/bash -c ". /etc/environment \&\& $PASSBOLT_BASE_DIR/bin/cron",' /etc/cron.d/$PASSBOLT_PKG \
38+
&& sed -i 's,www-data.*$,root su -s /bin/bash -c ". /etc/environment \&\& $PASSBOLT_BASE_DIR/bin/cron" www-data >/proc/1/fd/1 2>\&1,' /etc/cron.d/$PASSBOLT_PKG \
3939
&& sed -i 's/# server_tokens/server_tokens/' /etc/nginx/nginx.conf \
4040
&& ln -sf /dev/stdout /var/log/nginx/passbolt-access.log \
4141
&& ln -sf /dev/stderr /var/log/nginx/passbolt-error.log \
4242
&& ln -sf /dev/stderr /var/log/passbolt/error.log \
43-
&& ln -sf /dev/stderr /var/log/php$PHP_VERSION-fpm.log \
44-
&& crontab /etc/cron.d/$PASSBOLT_PKG
43+
&& ln -sf /dev/stderr /var/log/php$PHP_VERSION-fpm.log
4544

4645
COPY conf/supervisor/cron.conf /etc/supervisor/conf.d/cron.conf
4746
COPY conf/supervisor/nginx.conf /etc/supervisor/conf.d/nginx.conf

dev/Dockerfile

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
FROM composer:2.4 AS composer
2+
13
FROM php:8-fpm
24

35
LABEL maintainer="Passbolt SA <contact@passbolt.com>"
@@ -8,6 +10,7 @@ ARG PASSBOLT_CURL_HEADERS=""
810
ARG PASSBOLT_FLAVOUR="ce"
911

1012
ARG PHP_EXTENSIONS="gd \
13+
zip \
1114
intl \
1215
pdo_mysql \
1316
opcache \
@@ -24,6 +27,8 @@ ARG PASSBOLT_DEV_PACKAGES="libgpgme11-dev \
2427
libicu-dev \
2528
libxslt1-dev \
2629
libmcrypt-dev \
30+
libzip-dev \
31+
zip \
2732
unzip \
2833
libldap2-dev"
2934

@@ -40,6 +45,9 @@ ENV PHP_EXT_DIR="/usr/src/php/ext"
4045
ENV PASSBOLT_FLAVOUR=$PASSBOLT_FLAVOUR
4146

4247
WORKDIR /var/www/passbolt
48+
49+
COPY --from=composer /usr/bin/composer /usr/bin/composer
50+
4351
RUN apt-get update \
4452
&& apt-get -y install --no-install-recommends \
4553
$PASSBOLT_DEV_PACKAGES \
@@ -56,31 +64,18 @@ RUN apt-get update \
5664
&& docker-php-ext-install -j4 $PHP_EXTENSIONS $PECL_PASSBOLT_EXTENSIONS \
5765
&& docker-php-ext-enable $PHP_EXTENSIONS $PECL_PASSBOLT_EXTENSIONS \
5866
&& docker-php-source delete \
59-
&& EXPECTED_SIGNATURE=$(curl -s https://composer.github.io/installer.sig) \
60-
&& curl -o composer-setup.php https://getcomposer.org/installer \
61-
&& ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');") \
62-
&& if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then \
63-
>&2 echo 'ERROR: Invalid installer signature'; \
64-
rm composer-setup.php; \
65-
exit 1; \
66-
fi \
67-
&& php composer-setup.php \
68-
&& mv composer.phar /usr/local/bin/composer \
69-
&& rm composer-setup.php \
7067
&& curl -sSL -H "$PASSBOLT_CURL_HEADERS" "$PASSBOLT_URL" | tar zxf - -C . --strip-components 1 \
71-
&& composer install -n --no-dev --optimize-autoloader \
68+
&& composer install --no-ansi --no-interaction \
7269
&& chown -R www-data:www-data . \
7370
&& chmod 775 $(find /var/www/passbolt/tmp -type d) \
7471
&& chmod 664 $(find /var/www/passbolt/tmp -type f) \
7572
&& chmod 775 $(find /var/www/passbolt/webroot/img/public -type d) \
7673
&& chmod 664 $(find /var/www/passbolt/webroot/img/public -type f) \
7774
&& rm /etc/nginx/sites-enabled/default \
78-
&& apt-get purge -y --auto-remove $PASSBOLT_DEV_PACKAGES \
7975
&& rm -rf /var/lib/apt/lists/* \
80-
&& rm /usr/local/bin/composer \
8176
&& echo 'php_flag[expose_php] = off' > /usr/local/etc/php-fpm.d/expose.conf \
8277
&& sed -i 's/# server_tokens/server_tokens/' /etc/nginx/nginx.conf \
83-
&& mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
78+
&& mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" \
8479
&& echo "* * * * * su -c \"source /etc/environment ; /var/www/passbolt/bin/cake EmailQueue.sender\" -s /bin/bash www-data >> /var/log/cron.log 2>&1" >> /etc/cron.d/passbolt_email \
8580
&& crontab /etc/cron.d/passbolt_email \
8681
&& ln -s $(which php-fpm) $(which php-fpm)7.3

docker-compose/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PASSBOLT_API_PATH="/path/to/passbolt_api"

docker-compose/docker-compose-dev.yaml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,61 @@
11
version: '3.9'
2+
23
services:
34
db:
45
image: mariadb:10.3
6+
container_name: passbolt-db-dev
57
env_file:
68
- env/mysql.env
79
volumes:
10+
- ./mysql/init.sql:/docker-entrypoint-initdb.d/init.sql
811
- database_volume:/var/lib/mysql
912
ports:
10-
- "127.0.0.1:3306:3306"
13+
- "3306:3306"
1114

1215
passbolt:
1316
build:
1417
context: ..
1518
dockerfile: dev/Dockerfile
1619
args:
1720
PECL_PASSBOLT_EXTENSIONS: "redis gnupg xdebug"
21+
container_name: passbolt-app-dev
1822
depends_on:
1923
- db
24+
- mailhog
2025
env_file:
2126
- env/passbolt.env
2227
volumes:
23-
#- <PATH_TO_PASSBOLT_API>:/var/www/passbolt
28+
- ${PASSBOLT_API_PATH}:/var/www/passbolt
2429
- gpg_volume:/var/www/passbolt/config/gpg
2530
- images_volume:/var/www/passbolt/webroot/img/public/images
2631
command: ["/usr/bin/wait-for.sh", "db:3306", "--", "/docker-entrypoint.sh"]
2732
ports:
2833
- 80:80
2934
- 443:443
3035

36+
####################
37+
# Dev tools starts #
38+
####################
39+
adminer:
40+
image: adminer
41+
container_name: passbolt-adminer-dev
42+
restart: always
43+
ports:
44+
- "9501:8080"
45+
depends_on:
46+
- db
47+
48+
mailhog:
49+
image: mailhog/mailhog:latest
50+
container_name: passbolt-mailhog-dev
51+
restart: always
52+
# Mailhog logs are noisy so not logging it
53+
logging:
54+
driver: none
55+
ports:
56+
- "1025:1025" # SMTP server
57+
- "9502:8025" # Web UI
58+
3159
volumes:
3260
database_volume:
3361
gpg_volume:

docker-compose/env/passbolt.env

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# URL
1+
DEBUG=true
22
APP_FULL_BASE_URL=https://passbolt.local
33

44
# Database settings
@@ -8,6 +8,15 @@ DATASOURCES_DEFAULT_PASSWORD=P4ssb0lt
88
DATASOURCES_DEFAULT_DATABASE=passbolt
99
DATASOURCES_DEFAULT_PORT=3306
1010
DATASOURCES_QUOTE_IDENTIFIER=true
11+
# Test Database
12+
DATASOURCES_TEST_HOST=db
13+
DATASOURCES_TEST_USERNAME=passbolt
14+
DATASOURCES_TEST_PASSWORD=P4ssb0lt
15+
DATASOURCES_TEST_DATABASE=test_passbolt
16+
DATASOURCES_TEST_PORT=3306
1117

1218
# Registration
1319
PASSBOLT_REGISTRATION_PUBLIC=false
20+
21+
# Email settings
22+
EMAIL_TRANSPORT_DEFAULT_URL="smtp://:@mailhog:1025"

docker-compose/mysql/init.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE DATABASE IF NOT EXISTS `test_passbolt`;
2+
GRANT ALL PRIVILEGES ON test_passbolt.* TO 'passbolt'@'%';
3+
FLUSH PRIVILEGES;

0 commit comments

Comments
 (0)