Repository navigation
Expand file tree
/
Copy pathconfig.example.jsonc
More file actions
154 lines (127 loc) · 5.29 KB
/
Copy pathconfig.example.jsonc
File metadata and controls
154 lines (127 loc) · 5.29 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
// The port to listen server on for HTTP requests, default is 80.
"port": 80,
// The port to listen server on for HTTPs requests, default is 0 (disabled). Change to 443 if you want to enable it.
// You don't need to provide a certificate, the server uses ACME protocol to get a free certificate from Let's Encrypt.
// Note: if you are running the server in a docker container, you need to expose port `443:443`.
"tlsPort": 0,
// The public CDN origin, default is empty (use `http.Request.Host` as the origin).
// Required when `tlsPort` is enabled; automatic certificates are restricted to this hostname.
"cdnOrigin": "",
// Allowed CORS origins, default is allow all origins.
// Note: A valid origin must be a valid URL, including the protocol, domain, and port. e.g. "https://example.com".
"corsAllowOrigins": [],
// Proxy CIDRs allowed to supply X-Forwarded-For or X-Real-IP for client IPs.
// Empty by default. For a local reverse proxy, use ["127.0.0.1/32", "::1/128"].
"trustedProxies": [],
// Maximum number of concurrent build process, default equals to the number of CPU cores.
"buildConcurrency": 0,
// The wait time for incoming requests to wait for the build process to finish, default is 30 seconds.
"buildWaitTime": 30,
// Maximum time allowed for a single build task before it is canceled, default is 10 minutes.
"buildTimeout": 600,
// Compress http response body with gzip/brotli, default is true.
"compress": true,
// Minify built js/css files, default is true,
"minify": true,
// Generate source map for built js/css files, default is true.
"sourceMap": true,
// The storage option.
// Examples:
// - Use local file system as the storage:
// "storage": {
// "type": "fs",
// "endpoint": "/path/to/storage"
// }
// - Use S3-compatible storage:
// "storage": {
// "type": "s3",
// "endpoint": "https://bucket.s3.amazonaws.com",
// "region": "us-west-1",
// "accessKeyID": "***",
// "secretAccessKey": "***"
// }
"storage": {
// storage type, supported types are ["fs", "s3"], default is "fs".
"type": "fs",
// storage endpoint, default is "~/.esmd/storage".
"endpoint": "~/.esmd/storage",
// s3 storage region.
"region": "",
// s3 storage access key id.
"accessKeyID": "",
// s3 storage secret access key.
"secretAccessKey": "",
// cache files on local file system for s3 storage, default is disabled.
"cacheDir": ""
},
// The custom landing page options, default is empty.
// The server will proxy the `/` request to the `origin` server if it's provided.
// If your custom landing page has own assets, you also need to provide those asset paths in the `assets` field.
"customLandingPage": {
"origin": "https://example.com",
"assets": [
"/favicon.ico",
"/assets/app.js",
"/assets/app.css"
]
},
// The work directory for the build system, default is "~/.esmd".
"workDir": "~/.esmd",
// The log directory, default is "~/.esmd/log".
"logDir": "~/.esmd/log",
// The log level, available values are ["debug", "info", "warn", "error"], default is "info".
"logLevel": "info",
// Enable access log, default is disabled.
// The access log will be written to the log directory with the name "access-<date>.log".
"accessLog": false,
// The cache TTL for npm packages query, default is 600 seconds (10 minutes).
"npmQueryCacheTTL": 600,
// Cache purge API configuration.
"purgeAPI": {
// Enable cache purging (`POST /purge`), default is true.
// Can also be disabled with the `PURGE_CACHE=false` environment variable.
"enable": true,
// Require GitHub sign-in when both credentials are set. Proof-of-work is still required.
// Can also be provided with `PURGE_GITHUB_CLIENT_ID` / `PURGE_GITHUB_CLIENT_SECRET`.
"githubClientId": "",
"githubClientSecret": "",
// Purge Cloudflare package prefixes for exact versions when both credentials are set.
// Can also be provided with `PURGE_CLOUDFLARE_ZONE_ID` / `PURGE_CLOUDFLARE_API_TOKEN`.
"cloudflareZoneId": "",
"cloudflareApiToken": ""
},
// The global npm registry, default is "https://registry.npmjs.org/".
"npmRegistry": "https://registry.npmjs.org/",
// When the global npm registry is not available, the server will try to use the backup registry to download the package.
"npmBackupRegistry": "",
// The npm access token for the global npm registry, default is empty.
"npmToken": "",
// These two fields are used for basic authentication towards the global npm registry,
// default for both is empty.
"npmUser": "",
"npmPassword": "",
// Registries for scoped packages. This will ensure packages with these scopes get downloaded
// from specific registry, default is empty.
"npmScopedRegistries": {
"@scope_name": {
"registry": "https://your-registry.com/",
"token": "",
"user": "",
"password": ""
}
},
// The list to only allow some packages or scopes, default allow all.
"allowList": {
"packages": ["@scope_name/package_name"],
"scopes": ["@scope_name"]
},
// The list to ban some packages or scopes, default no ban.
"banList": {
"packages": ["@scope_name/package_name"],
"scopes": [{
"name": "@scope_name",
"excludes": ["package_name"]
}]
}
}