Merge branch 'PHRAS-3164_lightbox-download_link' of https://github.com/alchemy-fr/Phraseanet into PHRAS-3164_lightbox-download_link

This commit is contained in:
Harrys Ravalomanana
2020-07-07 14:53:55 +04:00
6 changed files with 18 additions and 6 deletions

7
.env
View File

@@ -13,6 +13,8 @@ RABBITMQ_MANAGEMENT_PORT=10811
MYSQL_ROOT_PASSWORD=root MYSQL_ROOT_PASSWORD=root
SERVER_NAME=phraseanet-docker SERVER_NAME=phraseanet-docker
# --------------- GATEWAY TIMEOUT -----------------------
GATEWAY_SEND_TIMEOUT=120
# --------------- PHP CONFIGURATION -------------------- # --------------- PHP CONFIGURATION --------------------
@@ -21,6 +23,9 @@ MAX_BODY_SIZE=2G
# Max input var # Max input var
MAX_INPUT_VARS=12000 MAX_INPUT_VARS=12000
MAX_EXECUTION_TIME=120
MAX_INPUT_TIME=60
# Enable opcache ? (0/1) # Enable opcache ? (0/1)
OPCACHE_ENABLED=1 OPCACHE_ENABLED=1
# session cache limiter (off/on) # session cache limiter (off/on)
@@ -34,6 +39,8 @@ PHP_LOG_LEVEL=warning
# These variables are used in the configuration.yml . # These variables are used in the configuration.yml .
# set here the first user / email couple # set here the first user / email couple
#set to id of Phraseanet root account, if you want activate a sync for Phraseanet root account password provide by PHRASEANET_ADMIN_ACCOUNT_PASSWORD env value.
PHRASEANET_ADMIN_ACCOUNT_ID=
PHRASEANET_ADMIN_ACCOUNT_EMAIL=admin@alchemy.fr PHRASEANET_ADMIN_ACCOUNT_EMAIL=admin@alchemy.fr
PHRASEANET_ADMIN_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly PHRASEANET_ADMIN_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly
# Database parameters # Database parameters

View File

@@ -19,6 +19,7 @@ services:
- phraseanet - phraseanet
environment: environment:
- MAX_BODY_SIZE - MAX_BODY_SIZE
- GATEWAY_SEND_TIMEOUT
ports: ports:
- ${PHRASEANET_APP_PORT}:80 - ${PHRASEANET_APP_PORT}:80
@@ -40,9 +41,12 @@ services:
- PHRASEANET_PROJECT_NAME - PHRASEANET_PROJECT_NAME
- MAX_BODY_SIZE - MAX_BODY_SIZE
- MAX_INPUT_VARS - MAX_INPUT_VARS
- MAX_EXECUTION_TIME
- MAX_INPUT_TIME
- OPCACHE_ENABLED - OPCACHE_ENABLED
- SESSION_CACHE_LIMITER - SESSION_CACHE_LIMITER
- PHP_LOG_LEVEL - PHP_LOG_LEVEL
- PHRASEANET_ADMIN_ACCOUNT_ID
- PHRASEANET_ADMIN_ACCOUNT_EMAIL - PHRASEANET_ADMIN_ACCOUNT_EMAIL
- PHRASEANET_ADMIN_ACCOUNT_PASSWORD - PHRASEANET_ADMIN_ACCOUNT_PASSWORD
- PHRASEANET_DB_HOST - PHRASEANET_DB_HOST

View File

@@ -2,6 +2,6 @@
set -xe set -xe
cat /nginx.conf.sample | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" > /etc/nginx/conf.d/default.conf cat /nginx.conf.sample | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" | sed "s/\$GATEWAY_SEND_TIMEOUT/$GATEWAY_SEND_TIMEOUT/g" > /etc/nginx/conf.d/default.conf
exec "$@" exec "$@"

View File

@@ -1,3 +1,4 @@
send_timeout $GATEWAY_SEND_TIMEOUT;
upstream backend { upstream backend {
server phraseanet:9000; server phraseanet:9000;
} }

View File

@@ -32,8 +32,8 @@ if [ -f "$FILE" ]; then
bin/setup system:config set registry.email.emitter-email $PHRASEANET_EMITTER_EMAIL bin/setup system:config set registry.email.emitter-email $PHRASEANET_EMITTER_EMAIL
bin/setup system:config set registry.email.prefix $PHRASEANET_MAIL_OBJECT_PREFIX bin/setup system:config set registry.email.prefix $PHRASEANET_MAIL_OBJECT_PREFIX
fi fi
if [[ $PHRASEANET_ADMIN_ACCOUNT_PASSWORD ]]; then if [[ -n ${PHRASEANET_ADMIN_ACCOUNT_ID} && $PHRASEANET_ADMIN_ACCOUNT_ID =~ ^[0-9]+$ ]]; then
bin/console user:password --user_id=1 --password $PHRASEANET_ADMIN_ACCOUNT_PASSWORD -y bin/console user:password --user_id=$PHRASEANET_ADMIN_ACCOUNT_ID --password $PHRASEANET_ADMIN_ACCOUNT_PASSWORD -y
fi fi
else else
@@ -58,7 +58,7 @@ chown -R app:app \
www www
if [ -d "plugins/" ];then if [ -d "plugins/" ];then
chown -R app:app plugin; chown -R app:app plugins;
fi fi
bash -e docker-php-entrypoint $@ bash -e docker-php-entrypoint $@

View File

@@ -380,7 +380,7 @@ expose_php = On
; Maximum execution time of each script, in seconds ; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time ; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI ; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 9999 max_execution_time = $MAX_EXECUTION_TIME
; Maximum amount of time each script may spend parsing request data. It's a good ; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly ; idea to limit this time on productions servers in order to eliminate unexpectedly
@@ -390,7 +390,7 @@ max_execution_time = 9999
; Development Value: 60 (60 seconds) ; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds) ; Production Value: 60 (60 seconds)
; http://php.net/max-input-time ; http://php.net/max-input-time
max_input_time = 60 max_input_time = $MAX_INPUT_TIME
; Maximum input variable nesting level ; Maximum input variable nesting level
; http://php.net/max-input-nesting-level ; http://php.net/max-input-nesting-level