Using Supabase for the Postgres Database

I am currently using supabase and have no issues. Just use the connection info under project settings > database > connection info. The install was really straightforward. I am also using supabase for media storage (utilizing the plugin that’s available for that). The README for the supabase upload plugin is not correct. You’ll have to add this section to your config/plugins.js and the associated variables to your .env file.

upload: {
  config: {
    provider: 'strapi-provider-upload-supabase',
    providerOptions: {
      apiUrl: env('SUPABASE_API_URL'),
      apiKey: env('SUPABASE_API_KEY'),
      bucket: env('SUPABASE_BUCKET'),
      directory: env('SUPABASE_DIRECTORY'),
      options: {}
    },
    breakpoints: {
      xlarge: 1920,
      large: 1000,
      medium: 750,
      small: 500,
      xsmall: 64,
    },
  },
},

In addition, I had to add CSP configuration to config\middlewares.js.

{
  name: 'strapi::security',
  config: {
    contentSecurityPolicy: {
      directives: {
        'default-src': ["'self'"],
        'img-src': ["'self'", 'data:', 'blob:', '<YOUR_SUPABASE_DOMAIN>'],
      },
    },
  },
},

See for CSP info:

3 Likes