Compare commits

..

2 Commits

Author SHA1 Message Date
4157b4bb21
Feature: adapt skeleton for wopi / jwt and secret/public keys in base64 format in production
All checks were successful
continuous-integration/drone/tag Build is passing
2023-01-13 13:31:11 +01:00
99ec0b765f
Feature: trigger migration automatically only in prod mode 2023-01-13 13:26:10 +01:00
4 changed files with 16 additions and 12 deletions

View File

@ -0,0 +1,10 @@
lexik_jwt_authentication:
# in production, the secret must be located in an environment variable
# for converting the file to a raw variable, use this command:
#
# cat path/to/private_or_public.pem | base64 -w0
#
# then copy past the printed string into the dedicated environment variable
secret_key: '%env(base64:resolve:JWT_SECRET_KEY)%'
public_key: '%env(base64:resolve:JWT_PUBLIC_KEY)%'
pass_phrase: '%env(JWT_PASSPHRASE)%'

View File

@ -1,3 +1,2 @@
wopi:
server: "%env(resolve:WOPI_SERVER)%"
access_token_ttl: 0

View File

@ -35,11 +35,6 @@ services:
resource: '../src/Service/'
Chill\WopiBundle\Service\Wopi\ChillWopi:
decorates: ChampsLibres\WopiLib\Contract\Service\WopiInterface
arguments:
$cache: '@cache.user_data'
ChampsLibres\WopiLib\Service\DocumentLockManager:
arguments:
$cache: '@cache.user_data'

View File

@ -36,6 +36,12 @@ fi
if [ "${APP_ENV}" = "prod" ]; then
composer dump-env "${APP_ENV}"
chmod +r /var/www/app/.env.local.php
if [ "${PREVENT_MIGRATIONS}" != "true" ]; then
php /var/www/app/bin/console doctrine:migrations:status
php /var/www/app/bin/console doctrine:migrations:migrate -n
php /var/www/app/bin/console messenger:setup-transports
fi
fi
if [ "${CLEAR_CACHE}" != "false" ]; then
@ -45,11 +51,5 @@ if [ "${CLEAR_CACHE}" != "false" ]; then
chgrp ${PHP_FPM_GROUP} /var/www/app/var/log -R && chmod g+rw /var/www/app/var/log -R
fi
if [ "${PREVENT_MIGRATIONS}" != "true" ]; then
php /var/www/app/bin/console doctrine:migrations:status
php /var/www/app/bin/console doctrine:migrations:migrate -n
php /var/www/app/bin/console messenger:setup-transports
fi
exec "${@}"