sst.config.ts 876 B

12345678910111213141516171819202122232425262728293031323334
  1. /// <reference path="./.sst/platform/config.d.ts" />
  2. export default $config({
  3. app(input) {
  4. return {
  5. name: "opencode",
  6. removal: input?.stage === "production" ? "retain" : "remove",
  7. protect: ["production"].includes(input?.stage),
  8. home: "cloudflare",
  9. providers: {
  10. stripe: {
  11. apiKey: process.env.STRIPE_SECRET_KEY!,
  12. },
  13. planetscale: "0.4.1",
  14. honeycomb: {
  15. version: "0.49.0",
  16. apiKey: process.env.HONEYCOMB_API_KEY!,
  17. },
  18. incident: {
  19. version: "5.35.0",
  20. apiKey: process.env.INCIDENT_API_KEY!,
  21. },
  22. },
  23. }
  24. },
  25. async run() {
  26. await import("./infra/app.js")
  27. await import("./infra/console.js")
  28. await import("./infra/enterprise.js")
  29. if ($app.stage === "production") {
  30. await import("./infra/monitoring.js")
  31. }
  32. },
  33. })