sst.config.ts 615 B

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