2
0

build: 👷 New compose file and entrypoints

This commit is contained in:
Baptiste Arnaud
2022-05-25 08:13:35 -07:00
parent 4a5a92b973
commit 5d786f59cc
44 changed files with 288 additions and 113 deletions

3
apps/viewer/.env.docker Normal file
View File

@ -0,0 +1,3 @@
NEXT_PUBLIC_VIEWER_URL=DOCKER_PUBLIC_VIEWER_URL
NEXT_PUBLIC_SMTP_FROM=DOCKER_NEXT_PUBLIC_SMTP_FROM
NEXT_PUBLIC_GOOGLE_CLIENT_ID=DOCKER_NEXT_PUBLIC_GOOGLE_CLIENT_ID

View File

@ -1,4 +1,3 @@
DATABASE_URL=postgresql://postgres:typebot@db:5432/typebot
NEXT_PUBLIC_VIEWER_URL=http://localhost:8081
ENCRYPTION_SECRET=SgVkYp2s5v8y/B?E(H+MbQeThWmZq4t6
ADMIN_EMAIL=contact@baptiste-arnaud.fr
ENCRYPTION_SECRET=SgVkYp2s5v8y/B?E(H+MbQeThWmZq4t6

View File

@ -1,4 +1,5 @@
import React from 'react'
import { isEmpty } from 'utils'
export const ErrorPage = ({ error }: { error: Error }) => {
return (
@ -11,7 +12,7 @@ export const ErrorPage = ({ error }: { error: Error }) => {
flexDirection: 'column',
}}
>
{!process.env.NEXT_PUBLIC_VIEWER_URL ? (
{isEmpty(process.env.NEXT_PUBLIC_VIEWER_URL) ? (
<>
<h1 style={{ fontWeight: 'bold', fontSize: '30px' }}>
NEXT_PUBLIC_VIEWER_URL is missing

View File

@ -1,4 +1,5 @@
import { CollaborationType, Prisma, User, WorkspaceRole } from 'db'
import { isNotEmpty } from 'utils'
const parseWhereFilter = (
typebotIds: string[] | string,
@ -19,7 +20,7 @@ const parseWhereFilter = (
id: typeof typebotIds === 'string' ? typebotIds : { in: typebotIds },
workspace:
(type === 'read' && user.email === process.env.ADMIN_EMAIL) ||
process.env.NEXT_PUBLIC_E2E_TEST
isNotEmpty(process.env.NEXT_PUBLIC_E2E_TEST)
? undefined
: {
members: {