-
Notifications
You must be signed in to change notification settings - Fork 669
Expand file tree
/
Copy pathwebiny.config.tsx
More file actions
123 lines (119 loc) · 5.52 KB
/
webiny.config.tsx
File metadata and controls
123 lines (119 loc) · 5.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import React from "react";
import { Admin, Api, Cli, Infra, Project } from "webiny/extensions";
import { Cognito } from "@webiny/cognito";
import { MyFeature } from "@/extensions/myFeature/Extension.js";
// import { MyIdpExtension } from "./extensions/idp/okta/MyIdpExtension.js";
export const Extensions = () => {
return (
<>
{/* Admin 👇 */}
<Admin.Extension src={"@/extensions/sampleEcommerce/index.tsx"} />
<Admin.Extension src={"@/extensions/customPageTypes/index.tsx"} />
{/*<Admin.Extension src={"@/extensions/AdminTitleLogo/AdminTitleLogo.tsx"} />*/}
{/*<Admin.Extension src={"/extensions/AdminTheme/AdminTheme.tsx"} />*/}
{/*<Admin.Extension src={"@/extensions/LexicalPlugin.tsx"} />*/}
<MyFeature />
{/* Infra 👇 */}
<Infra.PulumiResourceNamePrefix prefix={"myproj-"} />
<Infra.ProductionEnvironments environments={["prod", "staging"]} />
<Infra.Core.Pulumi src={"/extensions/MyCorePulumiHandler.ts"} />
<Infra.Vpc enabled={false} />
<Infra.OpenSearch enabled={false} />
<Infra.Encryption passphrase={"my-passphrase"} />
<Infra.Aws.Tags tags={{ OWNER: "me", PROJECT: "my-project" }} />
<Infra.Aws.Tags tags={{ OWNER2: "me2", PROJECT2: "my-project-2" }} />
<Infra.Aws.DefaultRegion name={"eu-central-1"} />
<Api.Route method={"GET"} path={"/my-api-route"} src={"/extensions/MyApiRoute.ts"} />
{/*<Infra.EnvVar varName="MY_ENV_VAR" value="myValue" />*/}
{/*<Infra.Api.LambdaFunction*/}
{/* functionSrc="/extensions/myLambdaFunction/handler.ts"*/}
{/* pulumiSrc="/extensions/myLambdaFunction/pulumi.ts"*/}
{/*/>*/}
{/*<Api.Extension src={"/extensions/models/ProductCategoryModel.ts"} />*/}
{/*<Api.Extension src={"/extensions/models/ProductModel.ts"} />*/}
{/*<Api.Extension src={"/extensions/models/contactSubmission/ContactSubmissionModel.ts"} />*/}
{/*<Api.Extension src={"/extensions/models/contactSubmission/ContactSubmissionHook.ts"} />*/}
{/*<Admin.Extension*/}
{/* src={"/extensions/models/contactSubmission/EmailEntryListColumn.tsx"}*/}
{/*/>*/}
{/*<Api.BuildParam paramName="MY_CUSTOM_BUILD_PARAM" value="customValue" />*/}
{/*<Api.BuildParam*/}
{/* paramName="MY_CUSTOM_BUILD_PARAM-2"*/}
{/* value={{ myKey: 2, nested: { foo: "bar" } }}*/}
{/*/>*/}
{/*<Admin.BuildParam*/}
{/* paramName="MY_CUSTOM_ADMIN_BUILD_PARAM-2"*/}
{/* value={{ myKey: 2, nested: { foo: "bar" } }}*/}
{/*/>*/}
{/*<Admin.BuildParam paramName="MY_CUSTOM_ADMIN_BUILD_PARAM" value="customAdminValue" />*/}
{/* Example: Environment-based conditional configuration */}
{/*<Infra.Env.Is env="prod">
<Infra.Aws.Tags tags={{ ENV: "production" }} />
</Infra.Env.Is>*/}
{/*<Infra.Env.Is env={["dev", "staging"]}>
<Infra.Aws.Tags tags={{ ENV: "non-production" }} />
</Infra.Env.Is>*/}
{/*<Infra.Admin.CustomDomains
domains={["my.domain.com"]}
sslMethod="sni-only"
certificateArn="arn:aws:acm:us-east-1:636962863878:certificate/3baf9092-fb27-4efb-9409-XXXXXXXX"
/>
<Infra.BlueGreenDeployments
enabled={true}
domains={{
acmCertificateArn:
"arn:aws:acm:us-east-1:636962863878:certificate/3baf9092-fb27-4efb-9409-XXXXXXXX",
sslSupportMethod: "sni-only",
domains: {
api: ["api.bg.webiny.com"],
admin: ["admin.bg.webiny.com"],
website: ["website.bg.webiny.com"],
preview: ["preview.bg.webiny.com"]
}
}}
deployments={[
{
name: "green",
env: "dev",
variant: "green"
},
{
name: "blue",
env: "dev",
variant: "blue"
}
]}
/>*/}
{/* Project 👇 */}
<Project.Telemetry enabled={false} />
<Project.FeatureFlags
features={{
fileManager: {
threatDetection: false
},
recordLocking: false
}}
/>
{process.env.WEBINY_CLI_AUTO_INSTALL && (
<Project.AutoInstall
adminUser={{
firstName: "Ad",
lastName: "Min",
email: "admin@webiny.com",
password: "12345678"
}}
/>
)}
{/* API */}
{/*<MyIdpExtension />*/}
<Cognito />
{/* Security 👇 */}
<Api.Extension src={"/extensions/MyApiKey.ts"} />
<Api.Extension src={"/extensions/MyApiKeyAfterUpdate.ts"} />
{/* CLI 👇 */}
<Cli.Command src={"/extensions/MyCustomCommand.ts"} />
{/* 🚧 WIP 👇 */}
{/*<AuditLogs.RetentionPeriod days={90} />*/}
</>
);
};