-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpostgresql_config.txt
More file actions
68 lines (58 loc) · 1.99 KB
/
Copy pathpostgresql_config.txt
File metadata and controls
68 lines (58 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# DiabetesAI - PostgreSQL Database Configuration
# Copy the content below to your .env file
# Database Connection
DATABASE_URL=postgresql+psycopg2://diabetes_user:diabetes123@localhost:5432/diabetesai
# PostgreSQL Specific Settings
PG_HOST=localhost
PG_PORT=5432
PG_DATABASE=diabetesai
PG_USER=diabetes_user
PG_PASSWORD=diabetes123
# Alternative DATABASE_URL formats:
# DATABASE_URL=postgresql://diabetes_user:diabetes123@localhost:5432/diabetesai
# DATABASE_URL=postgresql+psycopg2://diabetes_user:diabetes123@127.0.0.1:5432/diabetesai
# If you want to use a different PostgreSQL setup, update these values:
# PG_HOST=your-postgres-host
# PG_PORT=5432
# PG_DATABASE=your-database-name
# PG_USER=your-username
# PG_PASSWORD=your-secure-password
# Ollama Configuration (for AI agents)
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama3.1
# OpenAI fallback (dummy key for Ollama compatibility)
OPENAI_API_KEY=sk-test-dummy-key-for-ollama
# Optional: Redis for caching (if implemented)
# REDIS_URL=redis://localhost:6379
# Optional: Neo4j for graph database (if used)
# NEO4J_URI=bolt://localhost:7687
# NEO4J_USER=neo4j
# NEO4J_PASSWORD=password
# Application Settings
DEBUG=false
LOG_LEVEL=INFO
# =================================================================
# INSTRUÇÕES PARA CONFIGURAR POSTGRESQL:
# =================================================================
#
# 1. Instalar PostgreSQL:
# sudo apt install postgresql postgresql-contrib
#
# 2. Iniciar serviço:
# sudo systemctl start postgresql
# sudo systemctl enable postgresql
#
# 3. Criar usuário e banco:
# sudo -u postgres createuser --createdb diabetes_user
# sudo -u postgres psql -c "ALTER USER diabetes_user PASSWORD 'diabetes123';"
# sudo -u postgres createdb -O diabetes_user diabetesai
#
# 4. Copiar o conteúdo acima para .env
#
# 5. Executar migração:
# python migrate_to_postgresql.py
#
# 6. Testar:
# python test_postgresql_migration.py
#
# =================================================================