-
Setup Environment Variables
cp .env.example .env # Edit .env file with your actual API keys -
Build and Run
# Option 1: Using the convenience script ./docker-run.sh build ./docker-run.sh run # Option 2: Using Docker directly docker build -t ai-calendar-assistant . docker run -d --name ai-calendar-assistant -p 3002:3002 --env-file .env ai-calendar-assistant # Option 3: Using Docker Compose docker-compose up -d
-
Check if it's running
# Check container status docker ps # View logs docker logs ai-calendar-assistant # or ./docker-run.sh logs
Make sure to set these in your .env file:
OPENAI_API_KEY- Your OpenAI API keyTELEGRAM_BOT_TOKEN- Your Telegram bot tokenTELEGRAM_WEBHOOK_SECRET- Secret for webhook securityGOOGLE_OAUTH_CLIENT_ID- Google OAuth client IDGOOGLE_OAUTH_CLIENT_SECRET- Google OAuth client secretGOOGLE_OAUTH_REDIRECT_URL- OAuth redirect URL (default: http://localhost:3002/oauth/google/callback)
# Build the image
./docker-run.sh build
# Run the container
./docker-run.sh run
# Stop the container
./docker-run.sh stop
# Restart the container
./docker-run.sh restart
# View logs
./docker-run.sh logs
# Using Docker Compose
./docker-run.sh compose
./docker-run.sh compose-down- Check your .env file has all required variables
- Verify API keys are valid
- Check logs:
docker logs ai-calendar-assistant
- Stop any existing instances:
./docker-run.sh stop - Or change the port in docker-compose.yml
- Check health status:
docker ps(should show "healthy") - View detailed logs:
./docker-run.sh logs - Test health endpoint:
curl http://localhost:3002/telegram/health
The container includes a built-in health check that pings /telegram/health every 30 seconds. You can check the health status with:
docker ps # Look for "healthy" status
curl http://localhost:3002/telegram/healthThe docker-compose.yml includes volume mounts for:
./logs- Application logs./data- Any persistent data
These directories will be created automatically and persist between container restarts.