@ -1,12 +0,0 @@
|
||||
# Don't edit this file
|
||||
NEXT_PUBLIC_VIEWER_URL=
|
||||
NEXT_PUBLIC_SMTP_FROM=
|
||||
NEXT_PUBLIC_GOOGLE_API_KEY=
|
||||
NEXT_PUBLIC_GIPHY_API_KEY=
|
||||
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=
|
||||
NEXT_PUBLIC_SENTRY_DSN=
|
||||
NEXT_PUBLIC_VIEWER_INTERNAL_URL=
|
||||
NEXT_PUBLIC_E2E_TEST=
|
||||
NEXT_PUBLIC_VERCEL_VIEWER_PROJECT_NAME=
|
||||
NEXT_PUBLIC_UNSPLASH_APP_NAME=
|
||||
NEXT_PUBLIC_UNSPLASH_ACCESS_KEY=
|
@ -1,27 +0,0 @@
|
||||
{
|
||||
"id": "io.typebot",
|
||||
"title": "Typebot",
|
||||
"author": "Baptiste Arnaud <baptiste@typebot.io>",
|
||||
"description": "Typebot is a visual chatbot builder that helps you create chatbots for your website without coding.",
|
||||
"tagline": "Build advanced chatbots visually",
|
||||
"version": "2.14.0",
|
||||
"healthCheckPath": "/",
|
||||
"httpPort": 3000,
|
||||
"httpPorts": {
|
||||
"TYPEBOT_VIEWER_HOST": {
|
||||
"title": "Typebot Viewer",
|
||||
"description": "The Typebot viewer where your users can interact with your bots",
|
||||
"containerPort": 3001,
|
||||
"defaultValue": "bot"
|
||||
}
|
||||
},
|
||||
"addons": {
|
||||
"localstorage": {},
|
||||
"postgresql": {},
|
||||
"sendmail": {}
|
||||
},
|
||||
"manifestVersion": 2,
|
||||
"website": "https://typebot.io",
|
||||
"contactEmail": "support@typebot.io",
|
||||
"memoryLimit": 1073741824
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
FROM cloudron/base:4.1.0 AS base
|
||||
|
||||
FROM baptistearno/typebot-builder:latest AS typebot-builder
|
||||
|
||||
FROM baptistearno/typebot-viewer:latest AS typebot-viewer
|
||||
|
||||
FROM base AS runner
|
||||
RUN mkdir -p /app/code
|
||||
WORKDIR /app/code
|
||||
ENV NODE_ENV production
|
||||
RUN apt-get -qy update \
|
||||
&& apt-get -qy --no-install-recommends install \
|
||||
openssl \
|
||||
&& apt-get autoremove -yq \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=typebot-builder /app ./builder/
|
||||
COPY --from=typebot-viewer /app ./viewer/
|
||||
RUN builder/node_modules/.bin/prisma generate --schema=builder/packages/prisma/postgresql/schema.prisma
|
||||
RUN viewer/node_modules/.bin/prisma generate --schema=viewer/packages/prisma/postgresql/schema.prisma
|
||||
COPY ./packages/cloudron/start.sh ./packages/cloudron/env.default.sh ./
|
||||
COPY ./packages/cloudron/.env.docker ./scripts/inject-runtime-env.sh /run/
|
||||
RUN touch /run/builder_runtime_env.js && touch /run/viewer_runtime_env.js
|
||||
RUN ln -s /run/builder_runtime_env.js builder/apps/builder/public/__env.js && ln -s /run/viewer_runtime_env.js viewer/apps/viewer/public/__env.js
|
||||
RUN chmod +x ./start.sh && chmod +x ./env.default.sh && chmod +x /run/inject-runtime-env.sh
|
||||
ADD ./packages/cloudron/supervisor/* /etc/supervisor/conf.d/
|
||||
ADD ./packages/cloudron/supervisord.conf /etc/supervisor/
|
||||
|
||||
CMD [ "/app/code/start.sh" ]
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 3001
|
||||
|
@ -1,13 +0,0 @@
|
||||
# Make sure to change this to your own random string of 32 characters (https://docs.typebot.io/self-hosting/docker#2-add-the-required-configuration)
|
||||
export ENCRYPTION_SECRET="2GKg2i0oqWTkfc8lipjRE2weLg3R+UuI"
|
||||
export NEXT_PUBLIC_VIEWER_URL="https://$TYPEBOT_VIEWER_HOST"
|
||||
export DATABASE_URL="$CLOUDRON_POSTGRESQL_URL"
|
||||
export NEXTAUTH_URL="$CLOUDRON_APP_ORIGIN"
|
||||
export SMTP_USERNAME="$CLOUDRON_MAIL_SMTP_USERNAME"
|
||||
export SMTP_PASSWORD="$CLOUDRON_MAIL_SMTP_PASSWORD"
|
||||
export SMTP_HOST="$CLOUDRON_MAIL_SMTP_SERVER"
|
||||
export SMTP_PORT="$CLOUDRON_MAIL_SMTP_PORT"
|
||||
export NEXT_PUBLIC_SMTP_FROM="$CLOUDRON_MAIL_FROM"
|
||||
|
||||
# For more configuration options, see https://docs.typebot.io/self-hosting/configuration
|
||||
|
@ -1,52 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
chown -R cloudron:cloudron /app/data
|
||||
|
||||
echo "Waiting for postgres to become ready...."
|
||||
|
||||
PG_READY="pg_isready -h $CLOUDRON_POSTGRESQL_HOST -p $CLOUDRON_POSTGRESQL_PORT"
|
||||
|
||||
until $PG_READY
|
||||
do
|
||||
sleep 2;
|
||||
done
|
||||
|
||||
echo "Database ready to accept connections."
|
||||
|
||||
if [[ ! -f "/app/data/env.sh" ]]; then
|
||||
echo "Creating env.sh file at /app/data/env.sh"
|
||||
cp ./env.default.sh /app/data/env.sh
|
||||
else
|
||||
echo "Skipping env.sh file creation. /app/data/env.sh exists."
|
||||
fi
|
||||
|
||||
echo "Sourcing env.sh file..."
|
||||
source /app/data/env.sh
|
||||
|
||||
echo 'Injecting environment variables into frontend...'
|
||||
ENVSH_NO_RECREATE=true ENVSH_ENV=/run/.env.docker ENVSH_OUTPUT=/run/builder_runtime_env.js /run/inject-runtime-env.sh
|
||||
ENVSH_NO_RECREATE=true ENVSH_ENV=/run/.env.docker ENVSH_OUTPUT=/run/viewer_runtime_env.js /run/inject-runtime-env.sh
|
||||
|
||||
echo 'Checking if required environment variables are set and valid...'
|
||||
|
||||
if [ -z "$DATABASE_URL" ]; then
|
||||
echo "DATABASE_URL is not set. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
if [ -z "$NEXTAUTH_URL" ]; then
|
||||
echo "NEXTAUTH_URL is not set. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./builder/node_modules/.bin/prisma migrate deploy --schema=builder/packages/prisma/postgresql/schema.prisma;
|
||||
|
||||
echo "==> Starting supervisor"
|
||||
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf
|
||||
|
@ -1,11 +0,0 @@
|
||||
[program:builder]
|
||||
priority=5
|
||||
directory=/app/code
|
||||
command=node /app/code/builder/apps/builder/server.js
|
||||
user=cloudron
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
@ -1,11 +0,0 @@
|
||||
[program:viewer]
|
||||
priority=5
|
||||
directory=/app/code
|
||||
environment=PORT=3001
|
||||
command=node /app/code/viewer/apps/viewer/server.js
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
@ -1,8 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
logfile=/tmp/supervisord.log
|
||||
pidfile=/tmp/supervisord.pid
|
||||
|
||||
[include]
|
||||
files = /etc/supervisor/conf.d/*.conf
|
Reference in New Issue
Block a user