3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 15:00:00 +00:00
zeppelin/docker/production/start-bot.sh
Dragory 29a1161c05
refactor: change how DEBUG behaves in prod
The env var now only affects the bot container, not the API.
This is because we don't currently need this extra debug information
for the API.

For the bot, with DEBUG set, the bot container will now start and do
nothing. To start the bot in this container in debug mode, open a
shell into the container and run the start-bot-prod-debug script
manually. This change was made to allow more control over what
profiling scripts and other things are run in the debug environment.
2023-06-26 19:35:19 +00:00

13 lines
375 B
Bash

#!/bin/bash
# This wrapper script is used to run different things based on the DEBUG env variable
# Exec is used to forward signals: https://unix.stackexchange.com/a/196053
cd /zeppelin/backend
if [ -n "$DEBUG" ]; then
echo "DEBUG MODE: Starting bot container without starting the bot"
exec tail -f /dev/null
else
echo "Starting bot"
exec npm run start-bot-prod
fi