Remove LibreTranslate tasks from deploy, add SESSION_HANDLER_DSN to prod env

- Remove Start/Wait/Translate LibreTranslate tasks from deploy.yml
- Add SESSION_HANDLER_DSN with Redis in env.local.j2 for prod sessions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-24 09:46:47 +01:00
parent 2987dbfd28
commit 6dfffac457
2 changed files with 2 additions and 23 deletions

View File

@@ -130,29 +130,7 @@
args:
chdir: /var/www/e-ticket
- name: Start LibreTranslate for translation
command: docker compose -f docker-compose-prod.yml up -d libretranslate
args:
chdir: /var/www/e-ticket
- name: Wait for LibreTranslate to be healthy
shell: |
for i in $(seq 1 60); do
docker compose -f docker-compose-prod.yml exec -T php curl -sf http://libretranslate:5000/languages >/dev/null 2>&1 && exit 0
sleep 5
done
echo "LibreTranslate not ready after 5 minutes, skipping translation"
exit 0
args:
chdir: /var/www/e-ticket
- name: Translate YAML files (FR → EN/ES/DE/IT) and stop LibreTranslate
command: make trans_prod
args:
chdir: /var/www/e-ticket
ignore_errors: true
- name: Ensure uploads directories exist with correct permissions
- name: Ensure uploads directories exist with correct permissions
file:
path: "/var/www/e-ticket/public/uploads/{{ item }}"
state: directory

View File

@@ -2,6 +2,7 @@ APP_ENV=prod
APP_SECRET={{ app_secret }}
DATABASE_URL="postgresql://e-ticket:{{ db_password }}@pgbouncer:6432/e-ticket?serverVersion=16&charset=utf8"
MESSENGER_TRANSPORT_DSN=redis://:{{ redis_password }}@redis:6379/messages
SESSION_HANDLER_DSN=redis://:{{ redis_password }}@redis:6379/1
MAILER_DSN={{ mailer_dsn }}
DEFAULT_URI=https://ticket.e-cosplay.fr
VITE_LOAD=1