@@ -28,6 +28,7 @@ type CustomName struct {
28
28
ApiURL string `env:"api.url,default=API_URL"`
29
29
GraphqlURL string `env:"api.graphql_url,default=GRAPHQL_URL"`
30
30
StorageS3URL string `env:"api.storage_s3_url,default=STORAGE_S3_URL"`
31
+ McpURL string `env:"api.mcp_url,default=MCP_URL"`
31
32
DbURL string `env:"db.url,default=DB_URL"`
32
33
StudioURL string `env:"studio.url,default=STUDIO_URL"`
33
34
InbucketURL string `env:"inbucket.url,default=INBUCKET_URL,deprecated"`
@@ -46,25 +47,35 @@ func (c *CustomName) toValues(exclude ...string) map[string]string {
46
47
values := map [string ]string {
47
48
c .DbURL : fmt .Sprintf ("postgresql://%s@%s:%d/postgres" , url .UserPassword ("postgres" , utils .Config .Db .Password ), utils .Config .Hostname , utils .Config .Db .Port ),
48
49
}
49
- if utils .Config .Api .Enabled && ! utils .SliceContains (exclude , utils .RestId ) && ! utils .SliceContains (exclude , utils .ShortContainerImageName (utils .Config .Api .Image )) {
50
+
51
+ apiEnabled := utils .Config .Api .Enabled && ! utils .SliceContains (exclude , utils .RestId ) && ! utils .SliceContains (exclude , utils .ShortContainerImageName (utils .Config .Api .Image ))
52
+ studioEnabled := utils .Config .Studio .Enabled && ! utils .SliceContains (exclude , utils .StudioId ) && ! utils .SliceContains (exclude , utils .ShortContainerImageName (utils .Config .Studio .Image ))
53
+ authEnabled := utils .Config .Auth .Enabled && ! utils .SliceContains (exclude , utils .GotrueId ) && ! utils .SliceContains (exclude , utils .ShortContainerImageName (utils .Config .Auth .Image ))
54
+ inbucketEnabled := utils .Config .Inbucket .Enabled && ! utils .SliceContains (exclude , utils .InbucketId ) && ! utils .SliceContains (exclude , utils .ShortContainerImageName (utils .Config .Inbucket .Image ))
55
+ storageEnabled := utils .Config .Storage .Enabled && ! utils .SliceContains (exclude , utils .StorageId ) && ! utils .SliceContains (exclude , utils .ShortContainerImageName (utils .Config .Storage .Image ))
56
+
57
+ if apiEnabled {
50
58
values [c .ApiURL ] = utils .Config .Api .ExternalUrl
51
59
values [c .GraphqlURL ] = utils .GetApiUrl ("/graphql/v1" )
60
+ if studioEnabled {
61
+ values [c .McpURL ] = utils .GetApiUrl ("/mcp" )
62
+ }
52
63
}
53
- if utils . Config . Studio . Enabled && ! utils . SliceContains ( exclude , utils . StudioId ) && ! utils . SliceContains ( exclude , utils . ShortContainerImageName ( utils . Config . Studio . Image )) {
64
+ if studioEnabled {
54
65
values [c .StudioURL ] = fmt .Sprintf ("http://%s:%d" , utils .Config .Hostname , utils .Config .Studio .Port )
55
66
}
56
- if utils . Config . Auth . Enabled && ! utils . SliceContains ( exclude , utils . GotrueId ) && ! utils . SliceContains ( exclude , utils . ShortContainerImageName ( utils . Config . Auth . Image )) {
67
+ if authEnabled {
57
68
values [c .PublishableKey ] = utils .Config .Auth .PublishableKey .Value
58
69
values [c .SecretKey ] = utils .Config .Auth .SecretKey .Value
59
70
values [c .JWTSecret ] = utils .Config .Auth .JwtSecret .Value
60
71
values [c .AnonKey ] = utils .Config .Auth .AnonKey .Value
61
72
values [c .ServiceRoleKey ] = utils .Config .Auth .ServiceRoleKey .Value
62
73
}
63
- if utils . Config . Inbucket . Enabled && ! utils . SliceContains ( exclude , utils . InbucketId ) && ! utils . SliceContains ( exclude , utils . ShortContainerImageName ( utils . Config . Inbucket . Image )) {
74
+ if inbucketEnabled {
64
75
values [c .MailpitURL ] = fmt .Sprintf ("http://%s:%d" , utils .Config .Hostname , utils .Config .Inbucket .Port )
65
76
values [c .InbucketURL ] = fmt .Sprintf ("http://%s:%d" , utils .Config .Hostname , utils .Config .Inbucket .Port )
66
77
}
67
- if utils . Config . Storage . Enabled && ! utils . SliceContains ( exclude , utils . StorageId ) && ! utils . SliceContains ( exclude , utils . ShortContainerImageName ( utils . Config . Storage . Image )) {
78
+ if storageEnabled {
68
79
values [c .StorageS3URL ] = utils .GetApiUrl ("/storage/v1/s3" )
69
80
values [c .StorageS3AccessKeyId ] = utils .Config .Storage .S3Credentials .AccessKeyId
70
81
values [c .StorageS3SecretAccessKey ] = utils .Config .Storage .S3Credentials .SecretAccessKey
@@ -202,6 +213,7 @@ func PrettyPrint(w io.Writer, exclude ...string) {
202
213
ApiURL : " " + utils .Aqua ("API URL" ),
203
214
GraphqlURL : " " + utils .Aqua ("GraphQL URL" ),
204
215
StorageS3URL : " " + utils .Aqua ("S3 Storage URL" ),
216
+ McpURL : " " + utils .Aqua ("MCP URL" ),
205
217
DbURL : " " + utils .Aqua ("Database URL" ),
206
218
StudioURL : " " + utils .Aqua ("Studio URL" ),
207
219
InbucketURL : " " + utils .Aqua ("Inbucket URL" ),
0 commit comments