Skip to content

Commit c3096f3

Browse files
committed
Limits on templates, make supabase template lighter (cut analytics and
functions)
1 parent acb38ff commit c3096f3

File tree

4 files changed

+1906
-2
lines changed

4 files changed

+1906
-2
lines changed

ent/schema/template.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ type TemplateService struct {
110110
VariablesMounts []*VariableMount `json:"variables_mounts" nullable:"false"` // Variables mounts
111111
ProtectedVariables []string `json:"protected_variables" nullable:"false"` // List of protected variables (can be edited, not deleted)
112112
InitDBReplacers map[string]string `json:"init_db_replacers,omitempty"` // Replacers for the init DB, will replace key with value in InitDB string
113+
Resources *Resources `json:"resources,omitempty"` // Resources for the service
113114
}
114115

115116
// TemplateVariable represents a configurable variable in a template

internal/services/templates/deploy.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ func (self *TemplatesService) DeployTemplate(ctx context.Context, requesterUserI
423423
HealthCheck: templateService.HealthCheck,
424424
VariableMounts: templateService.VariablesMounts,
425425
InitContainers: templateService.InitContainers,
426+
Resources: templateService.Resources,
426427
}
427428

428429
serviceConfig, err := self.repo.Service().CreateConfig(ctx, tx, createInput)

pkg/templates/supabase.go renamed to pkg/templates/supabase_full.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"github.com/unbindapp/unbind-api/internal/common/utils"
66
)
77

8-
// supabaseTemplate returns a template definition for Supabase
9-
func supabaseTemplate() *schema.TemplateDefinition {
8+
// supabaseFullTemplate returns a template definition for Supabase
9+
func supabaseFullTemplate() *schema.TemplateDefinition {
1010
return &schema.TemplateDefinition{
1111
Name: "Supabase",
1212
DisplayRank: uint(50000),

0 commit comments

Comments
 (0)