Skip to content

Commit

Permalink
🐳 Fix encryption length check script
Browse files Browse the repository at this point in the history
The encryption length can also be of length 80 if encoded with base64

Closes #516
  • Loading branch information
baptisteArno committed May 17, 2023
1 parent c451ba7 commit 0fc6bfa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
8 changes: 2 additions & 6 deletions apps/docs/docs/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,14 @@ services:
restart: always
depends_on:
- typebot-db
ports:
- '8080:3000'
extra_hosts:
- 'host.docker.internal:host-gateway'
# See https://docs.typebot.io/self-hosting/configuration for more configuration options
environment:
- DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
- NEXTAUTH_URL=https://typebot.domain.com
- NEXT_PUBLIC_VIEWER_URL=https://bot.domain.com
- ENCRYPTION_SECRET=Tz9sL3FBc+XnO86KS9ScPuYj79Y4rII/Ie+FkaNNUrk=
- ENCRYPTION_SECRET=K+Bar660Ofaec7v1jHC25tAn3l2b7c81
- ADMIN_EMAIL=baptiste.arnaud95@gmail.com
- SMTP_HOST=mail
- NEXT_PUBLIC_SMTP_FROM=notifications@typebot.domain.com
Expand All @@ -285,13 +283,11 @@ services:
virtual.tls-email: 'admin@example.com' # change to your email
image: baptistearno/typebot-viewer:latest
restart: always
ports:
- '8081:3000'
# See https://docs.typebot.io/self-hosting/configuration for more configuration options
environment:
- DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
- NEXT_PUBLIC_VIEWER_URL=https://bot.domain.com
- ENCRYPTION_SECRET=Tz9sL3FBc+XnO86KS9ScPuYj79Y4rII/Ie+FkaNNUrk=
- ENCRYPTION_SECRET=K+Bar660Ofaec7v1jHC25tAn3l2b7c81
- SMTP_HOST=mail
- NEXT_PUBLIC_SMTP_FROM=notifications@typebot.domain.com
- S3_ACCESS_KEY=minio
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
- '8080:3000'
extra_hosts:
- 'host.docker.internal:host-gateway'
# See https://docs.typebot.io/self-hosting/configuration for more configuration options
# See https://docs.typebot.io/self-hosting/configuration/builder for more configuration options
environment:
- DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
- NEXTAUTH_URL=<your-builder-url>
Expand All @@ -29,10 +29,11 @@ services:
restart: always
ports:
- '8081:3000'
# See https://docs.typebot.io/self-hosting/configuration for more configuration options
# See https://docs.typebot.io/self-hosting/configuration/viewer for more configuration options
environment:
- DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
- NEXT_PUBLIC_VIEWER_URL=<your-viewer-url>
- ENCRYPTION_SECRET=<your-encryption-secret>
- NEXTAUTH_URL=<your-builder-url>
volumes:
db_data:
2 changes: 1 addition & 1 deletion scripts/builder-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ -z "$DATABASE_URL" ]; then
exit 1
fi

if [ ${#ENCRYPTION_SECRET} -ne 32 ]; then
if [ ${#ENCRYPTION_SECRET} -ne 32 ] && [ ${#ENCRYPTION_SECRET} -ne 80 ]; then
echo "ENCRYPTION_SECRET is not 32 characters long. Exiting... (To generate a valid secret: https://docs.typebot.io/self-hosting/docker#2-add-the-required-configuration)"
exit 1
fi
Expand Down

2 comments on commit 0fc6bfa

@vercel
Copy link

@vercel vercel bot commented on 0fc6bfa May 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 0fc6bfa May 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./apps/docs

docs-git-main-typebot-io.vercel.app
docs-typebot-io.vercel.app
docs.typebot.io

Please sign in to comment.