Deployment Guide
Last Updated: 2026-05-08
Guide for deploying the Yappa Knowledge Hub.
Prerequisites
- PHP 8.2+
- Composer
- Node.js 18+
- SQLite3
- Git
Environment Setup
1. Clone and Install
bash
cd /home/ubuntu/yappa-knowledge-hub
# Node.js dependencies
npm install
# PHP dependencies
cd backend && composer install && cd ..2. Configure Environment
Create backend/.env:
bash
APP_ENV=prod
APP_SECRET=<random-32-char-string>
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# Notion API
NOTION_API_KEY=ntn_your-integration-key
NOTION_VERSION=2022-06-28
NOTION_DATABASE_KNOWLEDGE=<knowledge-db-id>
NOTION_DATABASE_CATEGORIES=<categories-db-id>
NOTION_DATABASE_DIGESTS=<digests-db-id>
# AI Provider
OPENAI_API_KEY=<your-openai-key>
OPENAI_API_URL=<api-url>
# Slack Integration
SLACK_BOT_URL=http://localhost:3001Create root .env:
bash
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_SIGNING_SECRET=your-signing-secret
SLACK_APP_TOKEN=xapp-your-app-level-token
PORT=3000
NODE_ENV=production
API_BASE_URL=http://localhost:8000/api3. Initialize Database
bash
cd backend
php bin/console doctrine:database:create
php bin/console doctrine:schema:create
php bin/console doctrine:schema:validateRunning Services
Backend (Symfony)
bash
cd backend
symfony server:start -d
# Or: php -S localhost:8000 -t public/Slack Bot (Node.js)
bash
# Build TypeScript
npm run build
# Start production
node dist/app.js
# Or with PM2
pm2 start dist/app.js --name yappa-bot
pm2 save
pm2 startupProduction Checklist
- [ ] Environment variables configured correctly
- [ ] Database schema created and validated
- [ ] Services running (PM2/systemd)
- [ ] Slack app installed and connected
- [ ] Notion databases shared with integration
- [ ] AI provider API key configured
- [ ] Log rotation configured