update docker-compose.yaml and run_demo.sh to properly check for LOGFIRE_API_KEY

This commit is contained in:
aayushwhiz 2024-12-05 12:28:12 -08:00
parent 711e0b8acc
commit db643399d4
2 changed files with 8 additions and 1 deletions

View file

@ -32,6 +32,8 @@ services:
- ./otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml
env_file:
- .env
environment:
- LOGFIRE_API_KEY
prometheus:
build:

View file

@ -12,10 +12,15 @@ start_demo() {
echo "Error: OPENAI_API_KEY environment variable is not set for the demo."
exit 1
fi
if [ -z "$LOGFIRE_API_KEY"]; then
echo "Error: LOGFIRE_API_KEY environment variable is not set for the demo."
exit 1
fi
echo "Creating .env file..."
echo "OPENAI_API_KEY=$OPENAI_API_KEY" > .env
echo ".env file created with OPENAI_API_KEY."
echo "LOGFIRE_API_KEY=$LOGFIRE_API_KEY" >> .env
echo ".env file created with OPENAI_API_KEY and LOGFIRE_API_KEY."
fi
# Step 3: Start Arch