sst.config.ts 623 B

1234567891011121314151617181920212223242526
  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. },
  14. }
  15. },
  16. async run() {
  17. const { api } = await import("./infra/app.js")
  18. const { auth, gateway } = await import("./infra/cloud.js")
  19. return {
  20. api: api.url,
  21. gateway: gateway.url,
  22. auth: auth.url,
  23. }
  24. },
  25. })