2
0

🐳 Fix encryption length check script

The encryption length can also be of length 80 if encoded with base64

Closes #516
This commit is contained in:
Baptiste Arnaud
2023-05-17 11:35:32 +02:00
parent c451ba7784
commit 0fc6bfa7ce
3 changed files with 6 additions and 9 deletions

View File

@ -261,8 +261,6 @@ services:
restart: always restart: always
depends_on: depends_on:
- typebot-db - typebot-db
ports:
- '8080:3000'
extra_hosts: extra_hosts:
- 'host.docker.internal:host-gateway' - '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 for more configuration options
@ -270,7 +268,7 @@ services:
- DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot - DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
- NEXTAUTH_URL=https://typebot.domain.com - NEXTAUTH_URL=https://typebot.domain.com
- NEXT_PUBLIC_VIEWER_URL=https://bot.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 - ADMIN_EMAIL=baptiste.arnaud95@gmail.com
- SMTP_HOST=mail - SMTP_HOST=mail
- NEXT_PUBLIC_SMTP_FROM=notifications@typebot.domain.com - NEXT_PUBLIC_SMTP_FROM=notifications@typebot.domain.com
@ -285,13 +283,11 @@ services:
virtual.tls-email: 'admin@example.com' # change to your email virtual.tls-email: 'admin@example.com' # change to your email
image: baptistearno/typebot-viewer:latest image: baptistearno/typebot-viewer:latest
restart: always 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 for more configuration options
environment: environment:
- DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot - DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
- NEXT_PUBLIC_VIEWER_URL=https://bot.domain.com - NEXT_PUBLIC_VIEWER_URL=https://bot.domain.com
- ENCRYPTION_SECRET=Tz9sL3FBc+XnO86KS9ScPuYj79Y4rII/Ie+FkaNNUrk= - ENCRYPTION_SECRET=K+Bar660Ofaec7v1jHC25tAn3l2b7c81
- SMTP_HOST=mail - SMTP_HOST=mail
- NEXT_PUBLIC_SMTP_FROM=notifications@typebot.domain.com - NEXT_PUBLIC_SMTP_FROM=notifications@typebot.domain.com
- S3_ACCESS_KEY=minio - S3_ACCESS_KEY=minio

View File

@ -17,7 +17,7 @@ services:
- '8080:3000' - '8080:3000'
extra_hosts: extra_hosts:
- 'host.docker.internal:host-gateway' - '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: environment:
- DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot - DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
- NEXTAUTH_URL=<your-builder-url> - NEXTAUTH_URL=<your-builder-url>
@ -29,10 +29,11 @@ services:
restart: always restart: always
ports: ports:
- '8081:3000' - '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: environment:
- DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot - DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
- NEXT_PUBLIC_VIEWER_URL=<your-viewer-url> - NEXT_PUBLIC_VIEWER_URL=<your-viewer-url>
- ENCRYPTION_SECRET=<your-encryption-secret> - ENCRYPTION_SECRET=<your-encryption-secret>
- NEXTAUTH_URL=<your-builder-url>
volumes: volumes:
db_data: db_data:

View File

@ -9,7 +9,7 @@ if [ -z "$DATABASE_URL" ]; then
exit 1 exit 1
fi 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)" 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 exit 1
fi fi