feat: migración a PostgreSQL, tiempo real SSE, Dockerfile y compose para Coolify

This commit is contained in:
urieljareth
2026-08-13 15:01:58 -06:00
commit f7fded5a44
28 changed files with 7314 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres_password_e3}@db:5432/${POSTGRES_DB:-encuesta_e3}
- ADMIN_SECRET=${ADMIN_SECRET:-RESETEOE3}
depends_on:
db:
condition: service_healthy
networks:
- app-network
db:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_DB=${POSTGRES_DB:-encuesta_e3}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres_password_e3}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-postgres} -d $${POSTGRES_DB:-encuesta_e3}"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
postgres_data: