diff --git a/package.json b/package.json index 5d07be82d..6f6249fa3 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "private": true, "scripts": { "build": "turbo run build", + "build:web": "turbo run build --filter=@documenso/web", "dev": "turbo run dev --filter=@documenso/web --filter=@documenso/marketing", "start": "cd apps && cd web && next start", "lint": "turbo run lint", diff --git a/packages/trpc/server/router.ts b/packages/trpc/server/router.ts index 4e272af6f..b8c97ba00 100644 --- a/packages/trpc/server/router.ts +++ b/packages/trpc/server/router.ts @@ -7,7 +7,9 @@ import { shareLinkRouter } from './share-link-router/router'; import { procedure, router } from './trpc'; export const appRouter = router({ - hello: procedure.query(() => 'Hello, world!'), + health: procedure.query(() => { + return { status: 'ok' }; + }), auth: authRouter, profile: profileRouter, document: documentRouter, diff --git a/render.yaml b/render.yaml index e6f54021e..eb213c32c 100644 --- a/render.yaml +++ b/render.yaml @@ -3,60 +3,100 @@ services: name: documenso-app env: node plan: free - buildCommand: npm i turbo && npm install --package-lock-only && npm ci && npm run build - startCommand: npx prisma migrate deploy; npm run start - healthCheckPath: /api/health + buildCommand: npm i && npm run build:web + startCommand: npx prisma migrate deploy --schema packages/prisma/schema.prisma && npm run start + healthCheckPath: /api/trpc/health envVars: + # Node Version - key: NODE_VERSION value: 18.17.0 - - key: DATABASE_URL - fromDatabase: - name: documenso-db - property: connectionString - - - key: NEXT_PUBLIC_WEBAPP_URL - fromService: - name: documenso-app - type: web - envVarKey: RENDER_EXTERNAL_URL - - - key: NEXTAUTH_SECRET - generateValue: true + - key: PORT + value: 10000 + # Auth - key: NEXTAUTH_URL fromService: name: documenso-app type: web envVarKey: RENDER_EXTERNAL_URL + - key: NEXTAUTH_SECRET + generateValue: true - - key: SENDGRID_API_KEY + # Database + - key: NEXT_PRIVATE_DATABASE_URL + fromDatabase: + name: documenso-db + property: connectionString + + - key: NEXT_PRIVATE_DIRECT_DATABASE_URL + fromDatabase: + name: documenso-db + property: connectionString + + # URLs + - key: NEXT_PUBLIC_WEBAPP_URL + fromService: + name: documenso-app + type: web + envVarKey: RENDER_EXTERNAL_URL + - key: NEXT_PUBLIC_MARKETING_URL + value: 'http://localhost:3001' + + # SMTP + - key: NEXT_PRIVATE_SMTP_TRANSPORT + value: 'smtp-auth' + - key: NEXT_PRIVATE_SMTP_HOST sync: false - - key: SMTP_MAIL_HOST + - key: NEXT_PRIVATE_SMTP_PORT sync: false - - key: SMTP_MAIL_PORT + - key: NEXT_PRIVATE_SMTP_USERNAME sync: false - - key: SMTP_MAIL_USER + - key: NEXT_PRIVATE_SMTP_PASSWORD sync: false - - key: SMTP_MAIL_PASSWORD + - key: NEXT_PRIVATE_SMTP_FROM_NAME sync: false - - key: MAIL_FROM + - key: NEXT_PRIVATE_SMTP_FROM_ADDRESS sync: false - - key: NEXT_PUBLIC_ALLOW_SUBSCRIPTIONS - value: false - - key: STRIPE_API_KEY + # Stripe + - key: NEXT_PRIVATE_STRIPE_API_KEY sync: false - - key: STRIPE_WEBHOOK_SECRET + - key: NEXT_PRIVATE_STRIPE_WEBHOOK_SECRET sync: false - key: NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID sync: false - key: NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID sync: false - - key: NEXT_PUBLIC_ALLOW_SIGNUP - value: true + # Features + - key: NEXT_PUBLIC_POSTHOG_KEY + sync: false + - key: NEXT_PUBLIC_POSTHOG_HOST + value: 'https://eu.posthog.com' + - key: NEXT_PUBLIC_FEATURE_BILLING_ENABLED + sync: false + + # Redis (Only required for marketing site, but added for completeness) + - key: NEXT_PRIVATE_REDIS_URL + sync: false + - key: NEXT_PRIVATE_REDIS_TOKEN + sync: false + + # Storage + - key: NEXT_PUBLIC_UPLOAD_TRANSPORT + value: 'database' + - key: NEXT_PRIVATE_UPLOAD_ENDPOINT + sync: false + - key: NEXT_PRIVATE_UPLOAD_REGION + sync: false + - key: NEXT_PRIVATE_UPLOAD_BUCKET + sync: false + - key: NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID + sync: false + - key: NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY + sync: false databases: - name: documenso-db