33800 Docs

← Retour

Proposition : Supabase PROD + DEV

Date : 20/12/2025 Status : IMPLEMENTEE Demande : Recréer Supabase DEV proprement et déployer Supabase PROD


Analyse de l'existant (DEV)

Services actuellement déployés sur dev-portainer

Service Image Status
supabase-db supabase/postgres:15.8.1.085 Healthy
supabase-studio supabase/studio:latest Unhealthy
supabase-kong kong:2.8.1 Healthy
supabase-auth supabase/gotrue:v2.183.0 Healthy
supabase-rest postgrest/postgrest:v13.0.7 Running
supabase-realtime supabase/realtime:v2.65.3 Restarting
supabase-storage supabase/storage-api:v1.32.0 Unhealthy
supabase-meta supabase/postgres-meta:v0.93.1 Healthy
supabase-edge-functions supabase/edge-runtime:v1.69.25 Running
supabase-analytics supabase/logflare:1.26.13 Healthy
supabase-vector timberio/vector:0.28.1-alpine Restarting
supabase-imgproxy darthsim/imgproxy:v3.8.0 Healthy
supabase-pooler supabase/supavisor:2.7.4 Healthy

Problèmes identifiés

  1. realtime et vector en boucle de restart
  2. storage et studio unhealthy
  3. Mots de passe par défaut non sécurisés
  4. Données sur stockage local /mnt/raid1/supabase/

Architecture proposée

Supabase PROD (prod-portainer - 192.168.1.11)

Élément Valeur
Machine prod-portainer (192.168.1.11)
Stockage données /mnt/stock_36to/data/33800-stack/databases/prod/supabase/
Stockage config /mnt/stock_36to/data/33800-stack/docker/stacks/supabase-prod/
URL Studio https://supabase-studio-prod.33800.nowhere84.com
URL API https://supabase-api-prod.33800.nowhere84.com
PostgreSQL Port 5432 (interne), accessible via pooler 6543

Ports exposés PROD : | Service | Port | |---------|------| | Kong API | 8200 | | Kong HTTPS | 8243 | | Studio | 8201 | | Pooler | 6643 | | Analytics | 4100 |

Supabase DEV (dev-portainer - 192.168.1.51)

Élément Valeur
Machine dev-portainer (192.168.1.51)
Stockage données /mnt/raid1/supabase/ (existant, à nettoyer)
Stockage config /home/gouroubleu/supabase-dev/
URL Studio https://supabase-studio-dev.33800.nowhere84.com
URL API https://supabase-api-dev.33800.nowhere84.com
PostgreSQL Port 5432 (interne), accessible via pooler 6543

Ports exposés DEV : | Service | Port | |---------|------| | Kong API | 8100 | | Kong HTTPS | 8143 | | Studio | 8101 | | Pooler | 6543 | | Analytics | 4000 |


Nouveaux secrets à générer

Secrets PROD (à ajouter dans secrets/prod.env)

# Supabase PROD
SUPABASE_PROD_POSTGRES_PASSWORD=<généré 32 chars>
SUPABASE_PROD_JWT_SECRET=<généré 64 chars>
SUPABASE_PROD_ANON_KEY=<JWT généré>
SUPABASE_PROD_SERVICE_ROLE_KEY=<JWT généré>
SUPABASE_PROD_DASHBOARD_PASSWORD=<généré 16 chars>
SUPABASE_PROD_SECRET_KEY_BASE=<généré 64 chars>
SUPABASE_PROD_VAULT_ENC_KEY=<généré 32 chars>
SUPABASE_PROD_POOLER_TENANT_ID=<UUID>

SUPABASE_PROD_URL=https://supabase-api-prod.33800.nowhere84.com
SUPABASE_PROD_STUDIO_URL=https://supabase-studio-prod.33800.nowhere84.com

Secrets DEV (à ajouter dans secrets/dev.env)

# Supabase DEV
SUPABASE_DEV_POSTGRES_PASSWORD=<généré 32 chars>
SUPABASE_DEV_JWT_SECRET=<généré 64 chars>
SUPABASE_DEV_ANON_KEY=<JWT généré>
SUPABASE_DEV_SERVICE_ROLE_KEY=<JWT généré>
SUPABASE_DEV_DASHBOARD_PASSWORD=<généré 16 chars>
SUPABASE_DEV_SECRET_KEY_BASE=<généré 64 chars>
SUPABASE_DEV_VAULT_ENC_KEY=<généré 32 chars>
SUPABASE_DEV_POOLER_TENANT_ID=<UUID>

SUPABASE_DEV_URL=https://supabase-api-dev.33800.nowhere84.com
SUPABASE_DEV_STUDIO_URL=https://supabase-studio-dev.33800.nowhere84.com

Versions des images (dernières stables)

Service Image
PostgreSQL supabase/postgres:15.8.1.085
Studio supabase/studio:20241216-8763bc5
Kong kong:2.8.1
Auth (GoTrue) supabase/gotrue:v2.183.0
REST (PostgREST) postgrest/postgrest:v13.0.7
Realtime supabase/realtime:v2.65.3
Storage supabase/storage-api:v1.32.0
Meta supabase/postgres-meta:v0.93.1
Edge Functions supabase/edge-runtime:v1.69.25
Analytics (Logflare) supabase/logflare:1.26.13
Vector timberio/vector:0.28.1-alpine
Imgproxy darthsim/imgproxy:v3.8.0
Pooler (Supavisor) supabase/supavisor:2.7.4

Plan d'exécution

Phase 1 : Préparation PROD

  1. Créer structure de dossiers sur NFS
  2. Générer tous les secrets sécurisés
  3. Générer les JWT (anon_key, service_role_key)
  4. Créer les fichiers de config (docker-compose, .env, kong.yml)
  5. Copier les fichiers SQL d'initialisation

Phase 2 : Déploiement PROD

  1. Démarrer les containers dans l'ordre
  2. Vérifier santé de chaque service
  3. Configurer Nginx reverse proxy
  4. Tester accès Studio et API

Phase 3 : Recréation DEV

  1. Arrêter Supabase DEV existant
  2. Sauvegarder données existantes (optionnel)
  3. Supprimer anciens volumes
  4. Générer nouveaux secrets DEV
  5. Redéployer avec config propre
  6. Configurer Nginx

Phase 4 : Validation

  1. Tester authentification sur les 2 environnements
  2. Tester upload storage
  3. Tester realtime
  4. Documenter les credentials dans secrets/

Questions avant exécution

  1. Données DEV existantes : Faut-il sauvegarder les données PostgreSQL actuelles de DEV avant de recréer ?

  2. Extensions PostgreSQL : Voulez-vous pgvector activé par défaut pour l'IA/embeddings ?

  3. SMTP : Voulez-vous configurer un vrai serveur SMTP ou garder le mode autoconfirm ?

  4. Edge Functions : Avez-vous des fonctions edge existantes à migrer ?


Validation

En attente de votre validation pour procéder.