PHRAS-3049 #comment auto-install reorganisation, more environement variable for mail configuration and http api setting

This commit is contained in:
nmaillat
2020-04-30 22:54:43 +02:00
parent 952af74c93
commit e109d3c365
2 changed files with 38 additions and 14 deletions

19
.env
View File

@@ -14,7 +14,7 @@ MYSQL_ROOT_PASSWORD=root
SERVER_NAME=phraseanet-docker SERVER_NAME=phraseanet-docker
# --------------- APPLICATION CONFIGURATION -------------------- # --------------- PHP CONFIGURATION --------------------
# Max upload size # Max upload size
MAX_BODY_SIZE=2G MAX_BODY_SIZE=2G
@@ -49,6 +49,23 @@ INSTALL_SERVER_NAME=localhost
# Mysql max allowed packet # Mysql max allowed packet
MYSQL_MAX_ALLOWED_PACKET=16M MYSQL_MAX_ALLOWED_PACKET=16M
# --------------- APPLICATION CONFIGURATION --------------------
# api
PHRASEANET_API_ENABLED=true
PHRASEANET_API_SSL=true
# Phraseanet mail configuration
PHRASEANET_EMITTER_EMAIL=phraseanet@example.com
PHRASEANET_MAIL_OBJECT_PREFIX=
PHRASEANET_SMTP_ENABLED=false
PHRASEANET_SMTP_HOST=
PHRASEANET_SMTP_PORT=
PHRASEANET_SMTP_AUTH_ENABLED=false
PHRASEANET_SMTP_SECURE_MODE=tls
PHRASEANET_SMTP_USER=
PHRASEANET_SMTP_PASSWORD=
# --- DEV purpose --- # --- DEV purpose ---

View File

@@ -25,6 +25,17 @@ fi
--server-name=$INSTALL_SERVER_NAME \ --server-name=$INSTALL_SERVER_NAME \
--data-path=/var/alchemy/Phraseanet/datas -y --data-path=/var/alchemy/Phraseanet/datas -y
# Bus configuration for scheduler & worker
bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry
bin/setup system:config set workers.queue.worker-queue.host rabbitmq
bin/setup system:config set workers.queue.worker-queue.port 5672
bin/setup system:config set workers.queue.worker-queue.user $INSTALL_RABBITMQ_USER
bin/setup system:config set workers.queue.worker-queue.password $INSTALL_RABBITMQ_PASSWORD
bin/setup system:config set workers.queue.worker-queue.vhost /
/var/alchemy/Phraseanet/bin/console compile:configuration
/var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.host elasticsearch /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.host elasticsearch
/var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2 /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2
/var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2 /var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2
@@ -38,22 +49,18 @@ fi
/var/alchemy/Phraseanet/bin/setup system:config set main.cache.options.namespace $INSTALL_SERVER_NAME /var/alchemy/Phraseanet/bin/setup system:config set main.cache.options.namespace $INSTALL_SERVER_NAME
/var/alchemy/Phraseanet/bin/setup system:config set main.cache.type redis /var/alchemy/Phraseanet/bin/setup system:config set main.cache.type redis
# Bus configuration for scheduler & worker
bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry
bin/setup system:config set workers.queue.worker-queue.host rabbitmq
bin/setup system:config set workers.queue.worker-queue.port 5672
bin/setup system:config set workers.queue.worker-queue.user $INSTALL_RABBITMQ_USER
bin/setup system:config set workers.queue.worker-queue.password $INSTALL_RABBITMQ_PASSWORD
bin/setup system:config set workers.queue.worker-queue.vhost /
# Create elasticsearch index
/var/alchemy/Phraseanet/bin/console searchengine:index -c
## enable API and disable ssl on it ## enable API and disable ssl on it
/var/alchemy/Phraseanet/bin/setup system:config set registry.api-clients.api-enabled true /var/alchemy/Phraseanet/bin/setup system:config set registry.api-clients.api-enabled $PHRASEANET_API_ENABLED
/var/alchemy/Phraseanet/bin/setup system:config set main.api_require_ssl false /var/alchemy/Phraseanet/bin/setup system:config set main.api_require_ssl $PHRASEANET_API_SSL
# set instance title # set instance title
bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME
/var/alchemy/Phraseanet/bin/console compile:configuration /var/alchemy/Phraseanet/bin/console compile:configuration
# Create elasticsearch index
/var/alchemy/Phraseanet/bin/console searchengine:index -c
# Create _TRASH_ collection on first databox
/var/alchemy/Phraseanet/bin/console collection:create 1 _TRASH_ -d 1