Skip to content

Commit

Permalink
PHRAS-3945 download async config change (#4423)
Browse files Browse the repository at this point in the history
* PHRAS-3945 change deployment for download async mode and pusher

* wip

* Missing var in setup container - WIP

* quiet option for sensitives values
  • Loading branch information
nmaillat authored Nov 30, 2023
1 parent 7bfd956 commit 670f860
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
4 changes: 1 addition & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ PHRASEANET_DOCKER_REGISTRY=local

# Docker images tag.
# @run
PHRASEANET_DOCKER_TAG=4.1.8-rc6
PHRASEANET_DOCKER_TAG=4.1.8-rc7

# Stack Name
# An optionnal Name for the stack
Expand Down Expand Up @@ -433,8 +433,6 @@ DB_BACKUP_GZIP_LEVEL=9
# --- Pusher settings --------------------------------------------------------------------------------------

# Pusher settings used when PHRASEANET_DOWNLOAD_ASYNC=true (configuration.yml: download_async / enabled=true)

# pusher key
# @run
PUSHER_AUTH_KEY

Expand Down
10 changes: 4 additions & 6 deletions config/configuration.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,10 @@ workers:
verify_ssl: true

externalservice:
ginger:
AutoSubtitling:
service_base_url: https://base.uri
token: 39c6011d
transcript_format: text/vtt
subdef_source: preview
pusher:
auth_key: 'pusher-auth_key'
secret: 'pusher-secret'
app_id: 'pusher-app_id'

user_account:
deleting_policies:
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ services:
- PHRASEANET_SMTP_USER
- PHRASEANET_SMTP_PASSWORD
- PHRASEANET_DOWNLOAD_DIR
- PHRASEANET_DOWNLOAD_ASYNC
- PUSHER_APP_ID
- PUSHER_SECRET
- PUSHER_AUTH_KEY
- PHRASEANET_LAZARET_DIR
- PHRASEANET_CAPTION_DIR
- PHRASEANET_WORKER_TMP
Expand Down
18 changes: 14 additions & 4 deletions docker/phraseanet/setup/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,21 @@ if [[ -f "$FILE" && $PHRASEANET_SETUP = 1 ]]; then
bin/setup system:config set -q workers.queue.worker-queue.user $PHRASEANET_RABBITMQ_USER
bin/setup system:config set -q workers.queue.worker-queue.password $PHRASEANET_RABBITMQ_PASSWORD

echo `date +"%Y-%m-%d %H:%M:%S"` " - Phraseanet setting DOWNLOAD_ASYNC & PUSHER"
echo `date +"%Y-%m-%d %H:%M:%S"` " - Phraseanet setting Download Async"
if [ -z "$PHRASEANET_DOWNLOAD_ASYNC" ]; then
echo "$(date +"%Y-%m-%d %H:%M:%S") - DownloadAsync not set, PHRASEANET_DOWNLOAD_ASYNC is null "
else
bin/setup system:config set download_async.enabled $PHRASEANET_DOWNLOAD_ASYNC
bin/setup system:config set pusher.auth_key $PUSHER_AUTH_KEY
bin/setup system:config set pusher.secret $PUSHER_SECRET
bin/setup system:config set pusher.app_id $PUSHER_APP_ID
fi

echo `date +"%Y-%m-%d %H:%M:%S"` " - Define external service Pusher"
if [ -z "$PUSHER_APP_ID" ]; then
echo "$(date +"%Y-%m-%d %H:%M:%S") - Pusher service not defined, PUSHER_APP_ID is null"
else
bin/setup system:config set -q externalservice.pusher.auth_key $PUSHER_AUTH_KEY
bin/setup system:config set -q externalservice.pusher.secret $PUSHER_SECRET
bin/setup system:config set -q externalservice.pusher.app_id $PUSHER_APP_ID
fi



Expand Down
3 changes: 3 additions & 0 deletions lib/conf.d/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ workers:
exportMail:
max_retry: 3
ttl_retry: 10000
downloadAsync:
max_retry: 3
ttl_retry: 10000
exposeUpload:
max_retry: 3
ttl_retry: 10000
Expand Down

0 comments on commit 670f860

Please sign in to comment.