Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ FIRECRAWL_API_KEY="" # For research, self-host or use cloud-version @ https://fi
TRUST_APP_URL="http://localhost:3008" # Trust portal public site for NDA signing and access requests

AUTH_TRUSTED_ORIGINS=http://localhost:3000,https://*.trycomp.ai,http://localhost:3002

# Set to 'true' when self-hosting to disable Next.js image optimization
# Required for Docker/self-hosted deployments where image optimization isn't available
SELF_HOSTING=false
1 change: 1 addition & 0 deletions SELF_HOSTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ For a functional deployment:
- **Email**: `RESEND_API_KEY` in app and portal
- **Workflows**: `TRIGGER_SECRET_KEY` in app
- **Misc**: `REVALIDATION_SECRET`, `NEXT_PUBLIC_PORTAL_URL` in app
- **Images**: `SELF_HOSTING=true` in app (disables Next.js image optimization for self-hosted deployments)

### Prerequisites

Expand Down
3 changes: 3 additions & 0 deletions apps/app/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ const config: NextConfig = {
hostname: '**',
},
],
// Disable image optimization for self-hosted deployments
// where Next.js image optimization isn't available
unoptimized: process.env.SELF_HOSTING === 'true',
},

experimental: {
Expand Down
1 change: 1 addition & 0 deletions apps/app/src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const env = createEnv({
NOVU_API_KEY: z.string().optional(),
INTERNAL_API_TOKEN: z.string().optional(),
STRIPE_SECRET_KEY: z.string().optional(),
SELF_HOSTING: z.string().transform((val) => val === 'true').optional().default('false'),
},

client: {
Expand Down