Guardado en BD: 2025-12-08 19:11:30+00 (hora de Canarias) Mostrado en tu cliente: 2025-12-08 16:11:30-03 (convertido a Paraguay, 3 horas menos) Ambas representan el MISMO momento en el tiempo, solo que en zonas horarias diferentes. 🌍 Resumen del Sistema Componente Zona Horaria Estado PostgreSQL (almacenamiento) +00 Atlantic/Canary ✅ CORRECTO Backend FastAPI Atlantic/Canary ✅ CORRECTO Frontend (usuario) Local del navegador ✅ CORRECTO (convierte automáticamente) Tu cliente PostgreSQL -0300 Paraguay ℹ️ Solo afecta cómo VES las fechas 💡 Conclusión
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: checklist-db
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-checklist_db}
|
|
POSTGRES_USER: ${POSTGRES_USER:-checklist_user}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-checklist_pass_2024}
|
|
TZ: Atlantic/Canary
|
|
PGTZ: Atlantic/Canary
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
|
|
- ./postgres-custom.conf:/etc/postgresql/postgresql.conf
|
|
command: postgres -c config_file=/etc/postgresql/postgresql.conf
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-checklist_user} -d ${POSTGRES_DB:-checklist_db}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build: ./backend
|
|
container_name: checklist-backend
|
|
environment:
|
|
DATABASE_URL: postgresql://${POSTGRES_USER:-checklist_user}:${POSTGRES_PASSWORD:-checklist_pass_2024}@postgres:5432/${POSTGRES_DB:-checklist_db}
|
|
SECRET_KEY: ${SECRET_KEY:-your-secret-key-change-in-production-min-32-chars}
|
|
OPENAI_API_KEY: ${OPENAI_API_KEY}
|
|
ENVIRONMENT: ${ENVIRONMENT:-development}
|
|
TZ: Atlantic/Canary
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./uploads:/app/uploads
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
container_name: checklist-frontend
|
|
ports:
|
|
- "5173:5173"
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
environment:
|
|
- VITE_API_URL=http://localhost:8000
|
|
command: npm run dev -- --host
|
|
|
|
volumes:
|
|
postgres_data:
|