SupabaseS
Supabase4y ago
raph

Supabase docker keep database on update

When I update Supabase I lose my database, I tried to presist the data by doing this in my yml file. I am doing some thing wrong? Each time I stop and start the container and new container is created and my data is lost. Please advise.

  # Comment out everything below this point if you are using an external Postgres database
  db:
    container_name: supabase-db
    image: supabase/postgres:14.1.0.21
    command: postgres -c config_file=/etc/postgresql/postgresql.conf
    restart: unless-stopped
    ports:
      - ${POSTGRES_PORT}:5432
    environment:
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    volumes:
      - ./volumes/db/data:/var/lib/docker/volumes/1c348aa63f846262ae48c2137bb77eb031cda8355ac18454f8b9412254d5d2ae/_data
      # - ./volumes/db/init:/docker-entrypoint-initdb.d


I missing something I should change?
Was this page helpful?