Commit 7bbe0563 authored by Matthieu FAURE's avatar Matthieu FAURE
Browse files

Comptoir v2.4.10-rc.1

parents 080798ab 8d619b6b
Pipeline #4041 passed with stage
in 6 minutes and 11 seconds
......@@ -36,7 +36,9 @@
*.phar binary
*.jpeg binary
*.svg binary
*.tar binary
*.tar.gz binary
*.tar.bz2 binary
# Font awesome
*.ttf binary
......
......@@ -25,8 +25,12 @@ config/Migrations/20170421082041_RemoveWebSiteUrlFromSoftwares.php
src/Controller/Api/V1/Component/
# Vagrant
tests/Gitlab_runner_locally/Vagrant/.vagrant
tests/Gitlab_runner_locally/Vagrant/*.log
CI/Gitlab_runner_locally/Vagrant/.vagrant
CI/Gitlab_runner_locally/Vagrant/*.log
Vagrant/Vagrant_For_Comptoir_local/.vagrant
Vagrant/Vagrant_For_Comptoir_local/*.log
Vagrant/Vagrant_For_Comptoir_remote/.vagrant
Vagrant/Vagrant_For_Comptoir_remote/*.log
# E2E_testing
Docker/E2E-Testing-local/tests/
......@@ -34,5 +38,7 @@ venv/
*geckodriver.log
*.pyc
# Source code copied files for Docker
# DOCKER: Source code copied for containers to use local files
Docker/Comptoir-dev-local/Comptoir-source-code
Docker/Comptoir-PHP-dev-local/Comptoir-source-code
Docker/Comptoir-PHP-dev-local/Dataset
image: docker:latest
stages:
- test
image: gitlab.adullact.net:4567/comptoir/comptoir-srv/comptoir-php:v1.0.0-rc.2
# When using "dind", it's wise to use the overlayfs driver for
# improved performance.
variables:
DOCKER_DRIVER: overlay
# Composer stores all downloaded packages in the vendor/ directory.
# Do not use the following if the vendor/ directory is committed to
# your git repository.
cache:
paths:
- vendor/
services:
- docker:dind
- postgres:9.5-alpine
variables:
# Postgres variables required by the image (see https://hub.docker.com/r/_/postgres/)
# Note: the image automatically create a DB for the user, and name it with the name of the user
POSTGRES_USER: comptoir
POSTGRES_PASSWORD: comptoir
# Comptoir variables
# By Docker convention, the hostname is the name of the image. See https://docs.gitlab.com/ce/ci/docker/using_docker_images.html/#accessing-the-services
DB_HOST: postgres
# Following three variables are set for consistency. If a developer ever changes the default DB passwd in the code,
# CI jobs will still work thanks to these variables :)
DB_USERNAME: $POSTGRES_USER
DB_PASSWORD: $POSTGRES_PASSWORD
DB_DATABASE: $POSTGRES_USER
before_script:
- apk add --update python py-pip python-dev bash
#- pip install --upgrade pip # TODO freeze a version of PIP
- pip install docker-compose
- bash CI/docker_install.sh
phpcs:
stage: test
script:
- bin/COMPTOIR_phpcs_on_last_commit.sh -d . -c $CI_COMMIT_SHA
allow_failure: true
unit_tests:
phpunit:
stage: test
services:
- name: postgres:9.5-alpine
alias: postgres-test
# There is a trick here: variables DB_USERNAME DB_PASSWORD and DB_DATABASE are used for both Postgres services.
# To distinguish them, the second one is aliased 'postgres-test', which makes it available on hostname with same
# name ('postgres-test'). CakePHP is then configured accordingly (app.default.php), and PHPUnit can use a DB named
# 'comptoir" on a host named 'postgres-test'
script:
- docker-compose -f ./Docker/compose-Comptoir-Dev.yml build
- docker-compose -f ./Docker/compose-Comptoir-Dev.yml up -d --remove-orphans
- docker exec docker_comptoir_dev_1 vendor/bin/phpunit --configuration phpunit.xml --coverage-text
- docker-compose -f ./Docker/compose-Comptoir-Dev.yml down
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text
## Steps to reproduce
(How one can reproduce the issue - this is very important)
## What is the current *bug* behavior?
(What actually happens)
## What is the expected *correct *behavior?
(What you should see instead)
## Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
## Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
/label [BUG](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues?label_name%5B%5D=BUG)
......@@ -14,6 +14,34 @@ et le projet suit [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
### Fixed
### Security
## [2.4.10-rc.1](https://gitlab.adullact.net/Comptoir/Comptoir-srv/tags/v2.4.10-rc.1) - 2019-03-27
### Added
Pour développeurs :
* [#575](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/575) Les images Docker peuvent envoyer des mails
* [#584](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/584) Les images Docker peuvent s'appuient l'image PHP (et non plus Ubuntu, trop volumineuse)
* [#580](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/580) Ajout de code sniffer dans les tests automatiques sur les fichiers modififés ajoutés dans le code source
* [#593](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/593) Ajout d'une base de données connue et fixe pour les tests fonctionnels
* [#603](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/603) Ajout de 4 utilisateurs documentés dans le jeu de données de tests
* [#534](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/534) Ajout de tests fonctionnels sur les créations de compte, les recherches, les tris
* [#589](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/589) Ajout de tests fonctionnels sur l'action utilisateur "connecter/deconnecter"
* [#609](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/609) Ajout de tests fonctionnels sur l'action utilisateur "mot de passe perdu"
* [#618](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/618) Ajout de tests fonctionnels sur l'action utilisateur "se déclarer utilisateur de"
* [#620](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/620) Sur une installation de dev, les mails sont envoyés par barman-dev
* [#638](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/638) Ajout machines Vagrant pour déploiement local du Comptoir
### Deprecated
* [#640](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/640) comptoir.default.php est déprécié au profit de son pendant dans le projet Puppet-Comptoir
### Fixed
* [#570](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/570) Rétablissement des tri et filtre des utilisateurs (suite à la création de la rubrique Prestataire dans la barre de navigation)
* [#609](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/609) Mot de passe perdu : Correction de l'envoi du mauvais formulaire qui demandait l'ancien mot de passe.
* [#587](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/587) Correction de l'erreur affichée lors de la déclaration d'un compte utilisateur comme utilisateur d'un logiciel
## [2.4.9](https://gitlab.adullact.net/Comptoir/Comptoir-srv/tags/v2.4.9) - 2018-08-16
### Fixed
......@@ -55,25 +83,40 @@ et le projet suit [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
### Changed
* Les prestataires sont maintenant séparés des utilisateurs et disposent d'une entrée propre dans la barre de navigation.
* Correction de bugs d'internationalisation (tout est censé être traduit de l'anglais vers le français)
## 2.4.7 - 2018-03-30
## 2.4.7 - 2018-03-28
(not tagged; SHA: `86d815d1a1476683716130d81870725375ea2170`)
## 2.4.6 - 2018-03-01
## 2.4.6 - 2018-03-02
(not tagged)
## 2.4.5 - 2018-02-02
## 2.4.4 - 2018-01-05
(not tagged)
## 2.4.4 - 2018-01-03
(not tagged; SHA: `adf22a7f5aa17506666bddd633eee43cfa879315`)
## 2.4.3 - 2017-12-22
## 2.4.2 - 2017-11-24
(not tagged; SHA: `a9bb10ae943be2daba3db99c1bc5ebce62b8e285`)
## 2.4.2 - 2017-11-14
(not tagged; SHA: `fcd9455df9e4e4965ae5fcff20e31237e3e2f259`)
## 2.4.1 - 2017-08-18
(not tagged; SHA: `860765ebecd10f1d337dc6f3c14334303ea29853`)
## 2.4.0 - 2017-08-04
(not tagged; SHA: `c59b2458a01cf41d100df9b387e8acb78dded8d1`)
## [2.3.2](https://gitlab.adullact.net/Comptoir/Comptoir-srv/tags/v2.3.2) - 2017-07-21
image: docker:latest
stages:
- test
# When using "dind", it's wise to use the overlayfs driver for
# improved performance.
variables:
DOCKER_DRIVER: overlay
services:
- docker:dind
before_script:
- apk add --update python py-pip python-dev bash git
- pip install docker-compose
- docker-compose -f ./Docker/compose-Comptoir-Dev.yml build
php_cs:
stage: test
script:
- docker-compose -f ./Docker/compose-Comptoir-Dev.yml up -d --remove-orphans
- docker exec docker_comptoir_dev_1 bin/COMPTOIR_phpcs_on_last_commit.sh -d . -c $CI_COMMIT_SHA
- docker-compose -f ./Docker/compose-Comptoir-Dev.yml down
allow_failure: true
unit_tests:
stage: test
script:
- docker-compose -f ./Docker/compose-Comptoir-Dev.yml up -d --remove-orphans
- docker exec docker_comptoir_dev_1 vendor/bin/phpunit --configuration phpunit.xml --coverage-text
- docker-compose -f ./Docker/compose-Comptoir-Dev.yml down
#!/usr/bin/env bash
# We need to install dependencies only for Docker
[[ ! -e /.dockerenv ]] && exit 0
set -xe
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
# All previous instructions up to here could be placed in a custom Docker image to speed up Job execution
# -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
# Comptoir Installation (debug mode)
/usr/local/bin/composer install --no-progress \
&& cp config/app.default.php config/app.php \
&& sed -i -e "s/\/\/COMPTOIR-DEBUG//" config/app.php \
&& sed -i -e "s/__SALT__/somerandomsalt/" config/app.php \
&& sed -i -e "s/'php',/env('SESSION_DEFAULTS', 'php'),/" config/app.php \
&& cp config/comptoir.default.php config/comptoir.php
FROM codeception/codeception
RUN mkdir -p /home/comptoir/tests
COPY tests/ Project/tests/
FROM php:7.0-apache
ENV DEBIAN_FRONTEND noninteractive
ARG my_branch
####################################################
# Pre-requesites #
####################################################
RUN apt-get update -q \
&& apt-get install -qqy \
git-core \
curl \
python-dev \
python-pip \
python-dev \
libicu-dev \
libmcrypt-dev \
libpq-dev \
libxml2-dev \
&& apt-get clean \
&& curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& docker-php-ext-install \
intl \
mcrypt \
pgsql \
xml \
zip \
&& a2enmod rewrite
####################################################
# Comptoir specifics #
####################################################
COPY php.ini /usr/local/etc/php/
RUN useradd -d /home/comptoir/ -m -s /bin/bash comptoir
USER comptoir
RUN git clone https://gitlab.adullact.net/Comptoir/Comptoir-srv.git /home/comptoir/Comptoir-srv/
WORKDIR /home/comptoir/Comptoir-srv/
RUN git checkout $my_branch
####################################################
# Composer and Comptoir installation #
####################################################
# --ignore-platform-reqs is required because:
# "The composer image does not contain the extension. Your application image does.
# Composer is not running inside your application image though, it is running inside its own image."
# Source https://github.com/RobLoach/docker-composer/issues/104#issuecomment-251073334
RUN composer install --no-dev --ignore-platform-reqs \
# ---------
# Copy the app.php file
# Inject some non random salt for this example
# Make sessionhandler based on env file
&& cp config/app.default.php config/app.php \
&& sed -i -e "s/__SALT__/somerandomsalt/" config/app.php \
&& sed -i -e "s/'php',/env('SESSION_DEFAULTS', 'php'),/" config/app.php \
&& cp config/comptoir.default.php config/comptoir.php \
&& tar zxvf tests/TestFiles/FunctionalsTests/files.tar.gz -C webroot/img/
USER root
RUN usermod -aG comptoir root \
&& usermod -aG comptoir www-data \
&& chgrp -R comptoir logs tmp webroot \
&& chmod -R g+rw logs tmp webroot \
&& chmod g+s tmp/cache/persistent/
####################################################
# Apache: adjust conf and run #
####################################################
ENV APACHE_DOCUMENT_ROOT /home/comptoir/Comptoir-srv/webroot
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
EXPOSE 80
CMD ["apache2-foreground"]
# Docker Image Comptoir on Debian 9 Stretch
As of 2018-04-07 this image build but the app is not working. File `logs/error.log` tells:
```
2018-04-07 13:26:02 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/comptoir/Comptoir-srv/src/Template/Element/Pages/footer.ctp, line 36]
Request URL: /
Client IP: 172.20.0.1
Trace:
Cake\Error\BaseErrorHandler::handleError() - CORE/src/Error/BaseErrorHandler.php, line 146
include - APP/Template/Element/Pages/footer.ctp, line 36
Cake\View\View::_evaluate() - CORE/src/View/View.php, line 1014
Cake\View\View::_render() - CORE/src/View/View.php, line 973
Cake\View\View::_renderElement() - CORE/src/View/View.php, line 1363
Cake\View\View::element() - CORE/src/View/View.php, line 501
include - APP/Template/Layout/base.ctp, line 22
Cake\View\View::_evaluate() - CORE/src/View/View.php, line 1014
Cake\View\View::_render() - CORE/src/View/View.php, line 973
Cake\View\View::renderLayout() - CORE/src/View/View.php, line 644
Cake\View\View::render() - CORE/src/View/View.php, line 602
App\View\AppView::render() - APP/View/AppView.php, line 49
Cake\Controller\Controller::render() - CORE/src/Controller/Controller.php, line 617
Cake\Error\ExceptionRenderer::_outputMessage() - CORE/src/Error/ExceptionRenderer.php, line 319
Cake\Error\ExceptionRenderer::render() - CORE/src/Error/ExceptionRenderer.php, line 194
Cake\Error\ErrorHandler::_displayException() - CORE/src/Error/ErrorHandler.php, line 144
Cake\Error\BaseErrorHandler::handleException() - CORE/src/Error/BaseErrorHandler.php, line 180
Cake\Error\BaseErrorHandler::wrapAndHandleException() - CORE/src/Error/BaseErrorHandler.php, line 164
[main] - [internal], line ??
2018-04-07 13:26:02 Error: [Cake\Database\Exception\MissingExtensionException] Database driver Cake\Database\Driver\Postgres cannot be used due to a missing PHP extension or unmet dependency
Request URL: /
Client IP: 172.20.0.1
Stack Trace:
#0 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Database/Connection.php(108): Cake\Database\Connection->driver(Object(Cake\Database\Driver\Postgres), Array)
#1 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Datasource/ConnectionRegistry.php(89): Cake\Database\Connection->__construct(Array)
#2 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php(93): Cake\Datasource\ConnectionRegistry->_create('Cake\\Database\\C...', 'default', Array)
#3 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php(205): Cake\Core\ObjectRegistry->load('Cake\\Database\\C...', Array)
#4 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/ORM/Locator/TableLocator.php(175): Cake\Datasource\ConnectionManager::get('default')
#5 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/ORM/TableRegistry.php(110): Cake\ORM\Locator\TableLocator->get('Pages', Array)
#6 /home/comptoir/Comptoir-srv/src/Controller/Component/ValidationRulesComponent.php(28): Cake\ORM\TableRegistry::get('Pages')
#7 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Controller/Component.php(129): App\Controller\Component\ValidationRulesComponent->initialize(Array)
#8 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Controller/ComponentRegistry.php(118): Cake\Controller\Component->__construct(Object(Cake\Controller\ComponentRegistry), Array)
#9 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php(93): Cake\Controller\ComponentRegistry->_create('App\\Controller\\...', 'ValidationRules', Array)
#10 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Controller/Controller.php(322): Cake\Core\ObjectRegistry->load('ValidationRules', Array)
#11 /home/comptoir/Comptoir-srv/src/Controller/AppController.php(91): Cake\Controller\Controller->loadComponent('ValidationRules')
#12 /home/comptoir/Comptoir-srv/src/Controller/Api/V1/PagesController.php(40): App\Controller\AppController->initialize()
#13 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Controller/Controller.php(262): App\Controller\Api\V1\PagesController->initialize()
#14 [internal function]: Cake\Controller\Controller->__construct(Object(Cake\Network\Request), Object(Cake\Network\Response), 'Pages')
#15 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Http/ControllerFactory.php(79): ReflectionClass->newInstance(Object(Cake\Network\Request), Object(Cake\Network\Response), 'Pages')
#16 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Routing/Filter/ControllerFactoryFilter.php(63): Cake\Http\ControllerFactory->create(Object(Cake\Network\Request), Object(Cake\Network\Response))
#17 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Routing/Filter/ControllerFactoryFilter.php(49): Cake\Routing\Filter\ControllerFactoryFilter->_getController(Object(Cake\Network\Request), Object(Cake\Network\Response))
#18 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Routing/DispatcherFilter.php(144): Cake\Routing\Filter\ControllerFactoryFilter->beforeDispatch(Object(Cake\Event\Event))
#19 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Event/EventManager.php(426): Cake\Routing\DispatcherFilter->handle(Object(Cake\Event\Event), Object(Cake\Network\Request), Object(Cake\Network\Response))
#20 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Event/EventManager.php(391): Cake\Event\EventManager->_callListener(Array, Object(Cake\Event\Event))
#21 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php(78): Cake\Event\EventManager->dispatch(Object(Cake\Event\Event))
#22 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(80): Cake\Http\ActionDispatcher->dispatchEvent('Dispatcher.befo...', Array)
#23 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Routing/Dispatcher.php(60): Cake\Http\ActionDispatcher->dispatch(Object(Cake\Network\Request), Object(Cake\Network\Response))
#24 /home/comptoir/Comptoir-srv/webroot/index.php(36): Cake\Routing\Dispatcher->dispatch(Object(Cake\Network\Request), Object(Cake\Network\Response))
#25 {main}
```
FROM php:7.2-apache
ENV DEBIAN_FRONTEND noninteractive
ARG my_branch
####################################################
# Pre-requesites #
####################################################
RUN apt-get update -q \
&& apt-get install -qqy \
git-core \
curl \
python-dev \
python-pip \
python-dev \
libicu-dev \
libpq-dev \
libxml2-dev \
zlib1g-dev \
&& apt-get clean \
&& curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install -j$(nproc) intl
RUN docker-php-ext-install -j$(nproc) pgsql
RUN docker-php-ext-install -j$(nproc) zip
RUN apt-get install -qqy libmcrypt-dev
RUN pecl install mcrypt-1.0.1
COPY php.ini /usr/local/etc/php/
RUN docker-php-ext-enable \
mcrypt
RUN a2enmod rewrite
####################################################
# Comptoir specifics #
####################################################
RUN useradd -d /home/comptoir/ -m -s /bin/bash comptoir
USER comptoir
RUN git clone https://gitlab.adullact.net/Comptoir/Comptoir-srv.git /home/comptoir/Comptoir-srv/
WORKDIR /home/comptoir/Comptoir-srv/
RUN git checkout $my_branch
####################################################
# Composer and Comptoir installation #
####################################################
# --ignore-platform-reqs is required because:
# "The composer image does not contain the extension. Your application image does.
# Composer is not running inside your application image though, it is running inside its own image."
# Source https://github.com/RobLoach/docker-composer/issues/104#issuecomment-251073334
RUN composer install --no-dev --ignore-platform-reqs \
# ---------
# Copy the app.php file
# Inject some non random salt for this example
# Make sessionhandler based on env file
&& cp config/app.default.php config/app.php \
&& sed -i -e "s/__SALT__/somerandomsalt/" config/app.php \
&& sed -i -e "s/'php',/env('SESSION_DEFAULTS', 'php'),/" config/app.php \
&& cp config/comptoir.default.php config/comptoir.php \
&& tar zxvf tests/TestFiles/FunctionalsTests/files.tar.gz -C webroot/img/
USER root
RUN usermod -aG comptoir root \
&& usermod -aG comptoir www-data \
&& chgrp -R comptoir logs tmp webroot \
&& chmod -R g+rw logs tmp webroot \
&& chmod g+s tmp/cache/persistent/
####################################################
# Apache: adjust conf and run #
####################################################
ENV APACHE_DOCUMENT_ROOT /home/comptoir/Comptoir-srv/webroot
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
EXPOSE 80
CMD ["apache2-foreground"]
# Docker Image Comptoir on Debian 9 Stretch
As of 2018-04-07 this image build but the app is not working. File `logs/error.log` tells:
```
2018-04-07 13:26:02 Warning: Warning (2): Invalid argument supplied for foreach() in [/home/comptoir/Comptoir-srv/src/Template/Element/Pages/footer.ctp, line 36]
Request URL: /
Client IP: 172.20.0.1
Trace:
Cake\Error\BaseErrorHandler::handleError() - CORE/src/Error/BaseErrorHandler.php, line 146
include - APP/Template/Element/Pages/footer.ctp, line 36
Cake\View\View::_evaluate() - CORE/src/View/View.php, line 1014
Cake\View\View::_render() - CORE/src/View/View.php, line 973
Cake\View\View::_renderElement() - CORE/src/View/View.php, line 1363
Cake\View\View::element() - CORE/src/View/View.php, line 501
include - APP/Template/Layout/base.ctp, line 22
Cake\View\View::_evaluate() - CORE/src/View/View.php, line 1014
Cake\View\View::_render() - CORE/src/View/View.php, line 973
Cake\View\View::renderLayout() - CORE/src/View/View.php, line 644
Cake\View\View::render() - CORE/src/View/View.php, line 602
App\View\AppView::render() - APP/View/AppView.php, line 49
Cake\Controller\Controller::render() - CORE/src/Controller/Controller.php, line 617
Cake\Error\ExceptionRenderer::_outputMessage() - CORE/src/Error/ExceptionRenderer.php, line 319
Cake\Error\ExceptionRenderer::render() - CORE/src/Error/ExceptionRenderer.php, line 194
Cake\Error\ErrorHandler::_displayException() - CORE/src/Error/ErrorHandler.php, line 144
Cake\Error\BaseErrorHandler::handleException() - CORE/src/Error/BaseErrorHandler.php, line 180
Cake\Error\BaseErrorHandler::wrapAndHandleException() - CORE/src/Error/BaseErrorHandler.php, line 164
[main] - [internal], line ??
2018-04-07 13:26:02 Error: [Cake\Database\Exception\MissingExtensionException] Database driver Cake\Database\Driver\Postgres cannot be used due to a missing PHP extension or unmet dependency
Request URL: /
Client IP: 172.20.0.1
Stack Trace:
#0 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Database/Connection.php(108): Cake\Database\Connection->driver(Object(Cake\Database\Driver\Postgres), Array)
#1 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Datasource/ConnectionRegistry.php(89): Cake\Database\Connection->__construct(Array)
#2 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php(93): Cake\Datasource\ConnectionRegistry->_create('Cake\\Database\\C...', 'default', Array)
#3 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Datasource/ConnectionManager.php(205): Cake\Core\ObjectRegistry->load('Cake\\Database\\C...', Array)
#4 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/ORM/Locator/TableLocator.php(175): Cake\Datasource\ConnectionManager::get('default')
#5 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/ORM/TableRegistry.php(110): Cake\ORM\Locator\TableLocator->get('Pages', Array)
#6 /home/comptoir/Comptoir-srv/src/Controller/Component/ValidationRulesComponent.php(28): Cake\ORM\TableRegistry::get('Pages')
#7 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Controller/Component.php(129): App\Controller\Component\ValidationRulesComponent->initialize(Array)
#8 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Controller/ComponentRegistry.php(118): Cake\Controller\Component->__construct(Object(Cake\Controller\ComponentRegistry), Array)
#9 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php(93): Cake\Controller\ComponentRegistry->_create('App\\Controller\\...', 'ValidationRules', Array)
#10 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Controller/Controller.php(322): Cake\Core\ObjectRegistry->load('ValidationRules', Array)
#11 /home/comptoir/Comptoir-srv/src/Controller/AppController.php(91): Cake\Controller\Controller->loadComponent('ValidationRules')
#12 /home/comptoir/Comptoir-srv/src/Controller/Api/V1/PagesController.php(40): App\Controller\AppController->initialize()
#13 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Controller/Controller.php(262): App\Controller\Api\V1\PagesController->initialize()
#14 [internal function]: Cake\Controller\Controller->__construct(Object(Cake\Network\Request), Object(Cake\Network\Response), 'Pages')
#15 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Http/ControllerFactory.php(79): ReflectionClass->newInstance(Object(Cake\Network\Request), Object(Cake\Network\Response), 'Pages')
#16 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Routing/Filter/ControllerFactoryFilter.php(63): Cake\Http\ControllerFactory->create(Object(Cake\Network\Request), Object(Cake\Network\Response))
#17 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Routing/Filter/ControllerFactoryFilter.php(49): Cake\Routing\Filter\ControllerFactoryFilter->_getController(Object(Cake\Network\Request), Object(Cake\Network\Response))
#18 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Routing/DispatcherFilter.php(144): Cake\Routing\Filter\ControllerFactoryFilter->beforeDispatch(Object(Cake\Event\Event))
#19 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Event/EventManager.php(426): Cake\Routing\DispatcherFilter->handle(Object(Cake\Event\Event), Object(Cake\Network\Request), Object(Cake\Network\Response))
#20 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Event/EventManager.php(391): Cake\Event\EventManager->_callListener(Array, Object(Cake\Event\Event))
#21 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php(78): Cake\Event\EventManager->dispatch(Object(Cake\Event\Event))
#22 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php(80): Cake\Http\ActionDispatcher->dispatchEvent('Dispatcher.befo...', Array)
#23 /home/comptoir/Comptoir-srv/vendor/cakephp/cakephp/src/Routing/Dispatcher.php(60): Cake\Http\ActionDispatcher->dispatch(Object(Cake\Network\Request), Object(Cake\Network\Response))
#24 /home/comptoir/Comptoir-srv/webroot/index.php(36): Cake\Routing\Dispatcher->dispatch(Object(Cake\Network\Request), Object(Cake\Network\Response))
#25 {main}
```
FROM gitlab.adullact.net:4567/comptoir/comptoir-srv/comptoir-php:v1.0.0-rc.10
ENV COMPTOIR_REPOS https://gitlab.adullact.net/Comptoir/Comptoir-srv.git
# WORKDIR is set to /var/www/html/ in the parent image
RUN \
#
# Grab source code, be on `develop` branch
git clone "${COMPTOIR_REPOS}" . && \
git checkout develop && \
#
# COMPTOIR: composer
/usr/local/bin/composer install --no-progress
# Docker image: Comptoir-PHP-compose
This image is meant to speed up Comptoir testing, having `composer install` done (this taken a few minutes).
/!\ CAUTION:
This image must be re-built and re-uploaded to Gitlab Registry each time `composer.json` or `composer.lock` is modified.
## How to build + upload image to Gitlab Docker Registry
```
GITLAB_REGISTRY="gitlab.adullact.net:4567"
PROJECT="/comptoir/comptoir-srv"
IMAGE="comptoir-php-compose"
TAG="v1.0.0-rc.1"
docker login "${GITLAB_REGISTRY}"
docker build -t "${GITLAB_REGISTRY}${PROJECT}/${IMAGE}:${TAG}" .
docker images # check that the image has been built.
docker push "${GITLAB_REGISTRY}${PROJECT}/${IMAGE}:${TAG}"
```
FROM gitlab.adullact.net:4567/comptoir/comptoir-srv/comptoir-php:v1.0.0-rc.14
ENV DEBIAN_FRONTEND noninteractive
# WORKDIR is set to /var/www/html/ in the parent image
COPY Comptoir-source-code/ .
COPY comptoir-startup.sh /usr/local/bin/
RUN \
#
# COMPTOIR: composer
/usr/local/bin/composer install --no-progress \
#
# COMPTOIR: config files
&& cp config/app.default.php config/app.php \
&& sed -i -e "s/\/\/COMPTOIR-DEBUG//" config/app.php \
&& sed -i -e "s/__SALT__/somerandomsalt/" config/app.php \
&& sed -i -e "s/'php',/env('SESSION_DEFAULTS', 'php'),/" config/app.php \
&& sed -i -e "s/'host' => 'localhost',/'host' => 'smtp',/" config/app.php \
&& sed -i -e "s/'from' => 'barman@comptoir-du-libre.org',/'from' => 'barman-DEV@comptoir-du-libre.org',/" config/app.php \
&& cp config/comptoir.default.php config/comptoir.php
# Docker image: Comptoir-PHP-dev-local
This image is used when developing Comptoir.
It uses the source code place on the developer's host.
By now the source code is *copied* into the container. This means you need to recreate the container when source code
have been modified. One day, it'll be improved by using a Docker Volume instead od a COPY command.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or