Skip to content

Conversation

@sfinx13
Copy link
Collaborator

@sfinx13 sfinx13 commented Jan 7, 2026

Ticket

#5166

Description

Mise en place du nouveau mécanisme fiable de synchronisation Metabase basé sur :

  • une image Docker dédiée,
  • un service managé Serverless Job Scaleway
  • des commandes Makefile pour build / test / push

Changements apportés

  • Ajout d’un Dockerfile dédié
  • Ajout d’un script sync-db.sh encapsulant la logique d’exécution via la CLI Scalingo
  • Suppression de la tâche cron existante utilisée pour la synchronisation Metabase

Pré-requis

  1. Créer un token API scalingo https://dashboard.scalingo.com/account/tokens
  2. Ouvrir un terminal et exécuter export METABASE_SYNC_SCALINGO_API_TOKEN=xxxxxxxxxxxxxx

Tests

  • Vérifier que l'image se build correctement make scalingo-job-build
  • Vérifier que le container s’exécute en local make scalingo-job-run

Le push a déja été fait et taggé en 1.0.0 (pas utile de le faire)

image
  • Un job test a été lancé

La documentation de la mise en place et du mode opératoire est sur https://github.com/MTES-MCT/histologe/wiki/Synchronisation-base-de-donn%C3%A9es#-synchronisation-metabase-scalingo-via-scaleway-job

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 8, 2026

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK lecture et tests !

Comment on lines -14 to -16
-
command: 'sh /app/scripts/sync-db.sh'
schedule: '%env(METABASE_CRON_SCHEDULE_SYNC_BDD)%'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai déja désactivé le container clock sur preprod

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants