name: firestorm
services:
  auth:
    container_name: supabase-auth
    environment:
      API_EXTERNAL_URL: https://supabase.firestorm.chat
      GOTRUE_API_HOST: 0.0.0.0
      GOTRUE_API_PORT: "9999"
      GOTRUE_DB_DATABASE_URL: [REDACTED]
      GOTRUE_DB_DRIVER: postgres
      GOTRUE_DISABLE_SIGNUP: "false"
      GOTRUE_EXTERNAL_EMAIL_ENABLED: "true"
      GOTRUE_EXTERNAL_PHONE_ENABLED: "false"
      GOTRUE_JWT_ADMIN_ROLES: service_role
      GOTRUE_JWT_AUD: authenticated
      GOTRUE_JWT_DEFAULT_GROUP_NAME: authenticated
      GOTRUE_JWT_EXP: "3600"
      GOTRUE_JWT_SECRET: [REDACTED]
      GOTRUE_MAILER_AUTOCONFIRM: "false"
      GOTRUE_MAILER_URLPATHS_CONFIRMATION: /auth/v1/verify
      GOTRUE_MAILER_URLPATHS_EMAIL_CHANGE: /auth/v1/verify
      GOTRUE_MAILER_URLPATHS_INVITE: /auth/v1/verify
      GOTRUE_MAILER_URLPATHS_RECOVERY: /auth/v1/verify
      GOTRUE_SITE_URL: https://firestorm.chat
      GOTRUE_SMS_AUTOCONFIRM: "false"
      GOTRUE_SMTP_ADMIN_EMAIL: no-reply@firestorm.chat
      GOTRUE_SMTP_HOST: smtp.sendgrid.net
      GOTRUE_SMTP_PASS: [REDACTED]
      GOTRUE_SMTP_PORT: "587"
      GOTRUE_SMTP_SENDER_NAME: Firestorm
      GOTRUE_SMTP_USER: apikey
      GOTRUE_URI_ALLOW_LIST: ""
      MFA_ENABLED: ""
    healthcheck:
      test:
      - CMD
      - wget
      - --no-verbose
      - --tries=1
      - --spider
      - http://localhost:9999/health
      timeout: 5s
      interval: 5s
      retries: 3
    image: supabase/gotrue:v2.64.0
    networks:
      supa: null
    restart: unless-stopped
  firestorm:
    container_name: firestorm
    environment:
      PUBLIC_SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE
      PUBLIC_SUPABASE_URL: https://supabase.firestorm.chat
    image: ghcr.io/hamza1311/firestorm:latest
    networks:
      external: null
    restart: unless-stopped
  functions:
    command:
    - start
    - --main-service
    - /home/deno/functions/main
    container_name: supabase-edge-functions
    environment:
      JWT_SECRET: [REDACTED]
      SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE
      SUPABASE_DB_URL: [REDACTED]
      SUPABASE_SERVICE_ROLE_KEY: [REDACTED]
      SUPABASE_URL: http://kong:8000
      VERIFY_JWT: "false"
    image: supabase/edge-runtime:v1.2.12
    networks:
      supa: null
    restart: unless-stopped
    volumes:
    - type: bind
      source: /home/user/config/firestorm/volumes/functions
      target: /home/deno/functions
      bind:
        selinux: Z
        create_host_path: true
  imgproxy:
    container_name: supabase-imgproxy
    environment:
      IMGPROXY_BIND: :5001
      IMGPROXY_ENABLE_WEBP_DETECTION: "true"
      IMGPROXY_LOCAL_FILESYSTEM_ROOT: /
      IMGPROXY_USE_ETAG: "true"
    healthcheck:
      test:
      - CMD
      - imgproxy
      - health
      timeout: 5s
      interval: 5s
      retries: 3
    image: darthsim/imgproxy:v3.13
    networks:
      supa: null
    volumes:
    - type: bind
      source: /home/user/config/firestorm/volumes/storage
      target: /var/lib/storage
      bind:
        selinux: z
        create_host_path: true
  kong:
    container_name: supabase-kong
    environment:
      KONG_DATABASE: "off"
      KONG_DECLARATIVE_CONFIG: /var/lib/kong/kong.yml
      KONG_DNS_ORDER: LAST,A,CNAME
      KONG_NGINX_PROXY_PROXY_BUFFER_SIZE: 160k
      KONG_NGINX_PROXY_PROXY_BUFFERS: 64 160k
      KONG_PLUGINS: request-transformer,cors,key-auth,acl
    image: kong:2.8.1
    networks:
      external: null
      supa: null
    restart: unless-stopped
    volumes:
    - type: bind
      source: /home/user/config/firestorm/volumes/api/kong.yml
      target: /var/lib/kong/kong.yml
      read_only: true
      bind:
        create_host_path: true
  meta:
    container_name: supabase-meta
    environment:
      PG_META_DB_HOST: db
      PG_META_DB_NAME: postgres
      PG_META_DB_PASSWORD: [REDACTED]
      PG_META_DB_PORT: "5432"
      PG_META_DB_USER: supabase_admin
      PG_META_PORT: "8080"
    image: supabase/postgres-meta:v0.60.7
    networks:
      supa: null
    restart: unless-stopped
  realtime:
    command:
    - sh
    - -c
    - /app/bin/migrate && /app/bin/realtime eval 'Realtime.Release.seeds(Realtime.Repo)'
      && /app/bin/server
    container_name: realtime-dev.supabase-realtime
    environment:
      API_JWT_SECRET: [REDACTED]
      DB_AFTER_CONNECT_QUERY: SET search_path TO _realtime
      DB_ENC_KEY: supabaserealtime
      DB_HOST: db
      DB_NAME: postgres
      DB_PASSWORD: [REDACTED]
      DB_PORT: "5432"
      DB_USER: supabase_admin
      DNS_NODES: ''''''
      ENABLE_TAILSCALE: "false"
      ERL_AFLAGS: -proto_dist inet_tcp
      FLY_ALLOC_ID: fly123
      FLY_APP_NAME: realtime
      PORT: "4000"
      SECRET_KEY_BASE: [REDACTED]
    healthcheck:
      test:
      - CMD
      - bash
      - -c
      - printf \0 > /dev/tcp/localhost/4000
      timeout: 5s
      interval: 5s
      retries: 3
    image: supabase/realtime:v2.5.1
    networks:
      supa: null
    restart: unless-stopped
  rest:
    container_name: supabase-rest
    environment:
      PGRST_DB_ANON_ROLE: anon
      PGRST_DB_SCHEMAS: public,storage,graphql_public
      PGRST_DB_URI: [REDACTED]
      PGRST_DB_USE_LEGACY_GUCS: "false"
      PGRST_JWT_SECRET: [REDACTED]
    image: postgrest/postgrest:v10.1.2
    networks:
      supa: null
    restart: unless-stopped
  storage:
    container_name: supabase-storage
    depends_on:
      imgproxy:
        condition: service_started
      rest:
        condition: service_started
    environment:
      ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE
      DATABASE_URL: [REDACTED]
      ENABLE_IMAGE_TRANSFORMATION: "true"
      FILE_SIZE_LIMIT: "52428800"
      FILE_STORAGE_BACKEND_PATH: /var/lib/storage
      GLOBAL_S3_BUCKET: stub
      IMGPROXY_URL: http://imgproxy:5001
      PGRST_JWT_SECRET: [REDACTED]
      POSTGREST_URL: http://rest:3000
      REGION: stub
      SERVICE_KEY: [REDACTED]
      STORAGE_BACKEND: file
      TENANT_ID: stub
    healthcheck:
      test:
      - CMD
      - wget
      - --no-verbose
      - --tries=1
      - --spider
      - http://localhost:5000/status
      timeout: 5s
      interval: 5s
      retries: 3
    image: supabase/storage-api:v0.28.2
    networks:
      supa: null
    restart: unless-stopped
    volumes:
    - type: bind
      source: /home/user/config/firestorm/volumes/storage
      target: /var/lib/storage
      bind:
        selinux: z
        create_host_path: true
  studio:
    container_name: supabase-studio
    environment:
      DEFAULT_ORGANIZATION_NAME: Firestorm
      DEFAULT_PROJECT_NAME: Firestorm
      POSTGRES_PASSWORD: [REDACTED]
      STUDIO_PG_META_URL: http://meta:8080
      SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE
      SUPABASE_PUBLIC_URL: https://supabase.firestorm.chat
      SUPABASE_SERVICE_KEY: [REDACTED]
      SUPABASE_URL: http://kong:8000
    healthcheck:
      test:
      - CMD
      - node
      - -e
      - require('http').get('http://localhost:3000/api/profile', (r) => {if (r.statusCode
        !== 200) throw new Error(r.statusCode)})
      timeout: 5s
      interval: 5s
      retries: 3
    image: supabase/studio:latest
    networks:
      external: null
      supa: null
    restart: unless-stopped
networks:
  external:
    name: external
    external: true
  supa:
    name: supa
    external: true