@crossdelta/platform-sdk 0.5.12 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -574,14 +574,21 @@ export default handleEvent(
|
|
|
574
574
|
|
|
575
575
|
## 🔧 Configuration Example
|
|
576
576
|
|
|
577
|
+
Define infrastructure in `infra/services/*.ts` using [`@crossdelta/infrastructure`](https://www.npmjs.com/package/@crossdelta/infrastructure):
|
|
578
|
+
|
|
577
579
|
```ts
|
|
580
|
+
import { ports } from '@crossdelta/infrastructure'
|
|
578
581
|
import type { K8sServiceConfig } from '@crossdelta/infrastructure'
|
|
579
582
|
|
|
580
583
|
export const config: K8sServiceConfig = {
|
|
581
584
|
name: 'orders',
|
|
582
|
-
|
|
585
|
+
ports: ports().http(4001).build(),
|
|
583
586
|
replicas: 1,
|
|
584
|
-
healthCheck: {
|
|
587
|
+
healthCheck: { httpPath: '/health' },
|
|
588
|
+
resources: {
|
|
589
|
+
requests: { cpu: '50m', memory: '64Mi' },
|
|
590
|
+
limits: { cpu: '150m', memory: '128Mi' },
|
|
591
|
+
},
|
|
585
592
|
env: {
|
|
586
593
|
DATABASE_URL: databaseUrl,
|
|
587
594
|
NATS_URL: natsUrl,
|
|
@@ -589,6 +596,8 @@ export const config: K8sServiceConfig = {
|
|
|
589
596
|
}
|
|
590
597
|
```
|
|
591
598
|
|
|
599
|
+
**📖 See the [Infrastructure Package Docs](https://www.npmjs.com/package/@crossdelta/infrastructure) for advanced configuration options.**
|
|
600
|
+
|
|
592
601
|
<br />
|
|
593
602
|
|
|
594
603
|
---
|