Initial commit
This commit is contained in:
20
config/.env.example
Normal file
20
config/.env.example
Normal file
@@ -0,0 +1,20 @@
|
||||
# Discord Bot
|
||||
DISCORD_BOT_TOKEN=your_discord_bot_token_here
|
||||
|
||||
# API
|
||||
API_URL=http://app:5000
|
||||
|
||||
# Database
|
||||
DB_HOST=db
|
||||
DB_PORT=5432
|
||||
DB_NAME=app
|
||||
DB_USER=app
|
||||
DB_PASS=your_db_password_here
|
||||
|
||||
# JWT
|
||||
JWT_SECRET=your_jwt_secret_here
|
||||
|
||||
# AI / OpenRouter
|
||||
OPENROUTER_API_KEY=your_openrouter_api_key_here
|
||||
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
|
||||
AI_CONFIG_PATH=/app/ai/ai_config.json
|
||||
30
config/schema.sql
Normal file
30
config/schema.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
-- Users table (minimal)
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
id UUID PRIMARY KEY,
|
||||
username VARCHAR(255) UNIQUE NOT NULL,
|
||||
password_hashed BYTEA NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Notifications table
|
||||
CREATE TABLE IF NOT EXISTS notifications (
|
||||
id UUID PRIMARY KEY,
|
||||
user_uuid UUID REFERENCES users(id) ON DELETE CASCADE UNIQUE,
|
||||
discord_webhook VARCHAR(500),
|
||||
discord_enabled BOOLEAN DEFAULT FALSE,
|
||||
ntfy_topic VARCHAR(255),
|
||||
ntfy_enabled BOOLEAN DEFAULT FALSE,
|
||||
last_message_sent TIMESTAMP,
|
||||
current_notification_status VARCHAR(50) DEFAULT 'inactive',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Add your domain tables below
|
||||
-- Example:
|
||||
-- CREATE TABLE IF NOT EXISTS examples (
|
||||
-- id UUID PRIMARY KEY,
|
||||
-- user_uuid UUID REFERENCES users(id) ON DELETE CASCADE,
|
||||
-- name VARCHAR(255) NOT NULL,
|
||||
-- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
-- );
|
||||
Reference in New Issue
Block a user