montée version phpcas et image nineapache
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
Details
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
45c01d62db
commit
37bfdb3338
|
@ -99,11 +99,9 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"auto-scripts": {
|
"auto-scripts": {
|
||||||
"npm ci": "script",
|
"yarn install": "script",
|
||||||
"npm run encore -- dev": "script",
|
"yarn encore prod": "script",
|
||||||
"npm run encore -- prod": "script",
|
"cache:clear --env=PROD": "symfony-cmd",
|
||||||
"cache:clear --env=dev": "symfony-cmd",
|
|
||||||
"cache:clear --env=prod": "symfony-cmd",
|
|
||||||
"assets:install %PUBLIC_DIR%": "symfony-cmd"
|
"assets:install %PUBLIC_DIR%": "symfony-cmd"
|
||||||
},
|
},
|
||||||
"post-install-cmd": [
|
"post-install-cmd": [
|
||||||
|
|
|
@ -60,6 +60,7 @@ services:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./misc/images/app/app-docker/Dockerfile
|
dockerfile: ./misc/images/app/app-docker/Dockerfile
|
||||||
container_name: nineskeletor-app
|
container_name: nineskeletor-app
|
||||||
|
image: reg.cadoles.com/envole/nineskeletor
|
||||||
ports:
|
ports:
|
||||||
- ${APP_HTTP_PORT:-8080}:8080
|
- ${APP_HTTP_PORT:-8080}:8080
|
||||||
links:
|
links:
|
||||||
|
|
|
@ -1,12 +1,18 @@
|
||||||
ARG PHP_PKG_VERSION="8.1.22-r0"
|
FROM reg.cadoles.com/envole/nineapache:8.1
|
||||||
ARG ADDITIONAL_PACKAGES="tree \
|
|
||||||
php81-gd=${PHP_PKG_VERSION} \
|
|
||||||
php81-sodium=${PHP_PKG_VERSION} \
|
|
||||||
php81-fileinfo=${PHP_PKG_VERSION} \
|
|
||||||
php81-pdo=${PHP_PKG_VERSION} \
|
|
||||||
php81-pdo_pgsql=${PHP_PKG_VERSION} \
|
|
||||||
php81-intl=${PHP_PKG_VERSION} \
|
|
||||||
php81-ldap=${PHP_PKG_VERSION} \
|
|
||||||
php81-pecl-redis=5.3.7-r0"
|
|
||||||
|
|
||||||
FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.1-standalone
|
COPY ./misc/images/app/app-docker/apache.conf /etc/apache2/conf.d/nine/site.conf
|
||||||
|
|
||||||
|
RUN echo "* * * * * /app/bin/console app:Cron --env=prod" >> /var/spool/cron/crontabs/root
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Installation des dépendances composer
|
||||||
|
RUN composer install --no-interaction
|
||||||
|
|
||||||
|
RUN mkdir -p /app/var
|
||||||
|
RUN chown apache /app/var -R
|
||||||
|
RUN chmod u+w /app/var -R
|
||||||
|
RUN chmod g+w /app/var -R
|
||||||
|
|
||||||
|
CMD /app/misc/script/reconfigure.sh && /etc/apache2/apache2.sh
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
LoadModule rewrite_module modules/mod_rewrite.so
|
||||||
|
ServerName nineapache.local
|
||||||
|
DocumentRoot "/app/public"
|
||||||
|
Alias /nineskeletor /app/public
|
||||||
|
<Directory "/app/public">
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
|
||||||
|
RewriteRule .* - [E=BASE:%1]
|
||||||
|
RewriteCond %{HTTP:Authorization} .+
|
||||||
|
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
|
||||||
|
RewriteCond %{ENV:REDIRECT_STATUS} =""
|
||||||
|
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ %{ENV:BASE}/index.php [L]
|
||||||
|
</Directory>
|
|
@ -0,0 +1,12 @@
|
||||||
|
ARG PHP_PKG_VERSION="8.1.22-r0"
|
||||||
|
ARG ADDITIONAL_PACKAGES="tree \
|
||||||
|
php81-gd=${PHP_PKG_VERSION} \
|
||||||
|
php81-sodium=${PHP_PKG_VERSION} \
|
||||||
|
php81-fileinfo=${PHP_PKG_VERSION} \
|
||||||
|
php81-pdo=${PHP_PKG_VERSION} \
|
||||||
|
php81-pdo_pgsql=${PHP_PKG_VERSION} \
|
||||||
|
php81-intl=${PHP_PKG_VERSION} \
|
||||||
|
php81-ldap=${PHP_PKG_VERSION} \
|
||||||
|
php81-pecl-redis=5.3.7-r0"
|
||||||
|
|
||||||
|
FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.1-standalone
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
# Se positionner sur la racine du projet
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
cd ${DIR}
|
||||||
|
cd ../..
|
||||||
|
DIR=$(pwd)
|
||||||
|
|
||||||
|
bin/console d:s:u --force --complete
|
||||||
|
|
||||||
|
yarn encore prod
|
||||||
|
|
||||||
|
bin/console app:Init
|
||||||
|
bin/console app:Cron
|
||||||
|
|
||||||
|
exec $@
|
|
@ -81,9 +81,10 @@ class SecurityController extends AbstractController
|
||||||
$appMasteridentity = $this->getParameter('appMasteridentity');
|
$appMasteridentity = $this->getParameter('appMasteridentity');
|
||||||
|
|
||||||
// Init Client CAS
|
// Init Client CAS
|
||||||
$alias = $this->getParameter('appAlias');
|
$url=$this->getHost($request);
|
||||||
\phpCAS::setDebug($this->appKernel->getProjectDir().'/var/log/cas.log');
|
$url=str_replace("http://",$this->getParameter("protocole")."://",$url);
|
||||||
\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('casHost'), intval($this->getParameter('casPort')), is_null($this->getParameter('casPath')) ? '' : $this->getParameter('casPath'), false);
|
$url=str_replace("https://",$this->getParameter("protocole")."://",$url);
|
||||||
|
\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('casHost'), intval($this->getParameter('casPort')), is_null($this->getParameter('casPath')) ? '' : $this->getParameter('casPath'), $url, false);
|
||||||
\phpCAS::setNoCasServerValidation();
|
\phpCAS::setNoCasServerValidation();
|
||||||
|
|
||||||
// Authentification
|
// Authentification
|
||||||
|
@ -352,13 +353,16 @@ class SecurityController extends AbstractController
|
||||||
$request->getSession()->invalidate();
|
$request->getSession()->invalidate();
|
||||||
|
|
||||||
// Init Client CAS
|
// Init Client CAS
|
||||||
$alias = $this->getParameter('appAlias');
|
$url=$this->getHost($request);
|
||||||
\phpCAS::setDebug($this->appKernel->getProjectDir().'/var/log/cas.log');
|
$url=str_replace("http://",$this->getParameter("protocole")."://",$url);
|
||||||
\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('casHost'), intval($this->getParameter('casPort')), is_null($this->getParameter('casPath')) ? '' : $this->getParameter('casPath'), false);
|
$url=str_replace("https://",$this->getParameter("protocole")."://",$url);
|
||||||
|
\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('casHost'), intval($this->getParameter('casPort')), is_null($this->getParameter('casPath')) ? '' : $this->getParameter('casPath'), $url, false);
|
||||||
\phpCAS::setNoCasServerValidation();
|
\phpCAS::setNoCasServerValidation();
|
||||||
|
|
||||||
// Logout
|
// Logout
|
||||||
$url = $this->generateUrl('app_home', [], UrlGeneratorInterface::ABSOLUTE_URL);
|
$url=$this->generateUrl('app_home', array(), UrlGeneratorInterface::ABSOLUTE_URL);
|
||||||
|
$url=str_replace("http://",$this->getParameter("protocole")."://",$url);
|
||||||
|
$url=str_replace("https://",$this->getParameter("protocole")."://",$url);
|
||||||
\phpCAS::logout(['service' => $url]);
|
\phpCAS::logout(['service' => $url]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue