Primera versión del backend

This commit is contained in:
Mireya Cueto Garrido
2026-05-13 13:43:32 +02:00
parent 7d893c98fa
commit ebc3631cfd
32 changed files with 1264 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
services:
backend:
build:
context: ./backend
env_file:
- .env
environment:
DATABASE_URL: postgresql+psycopg://genexamenes:genexamenes@db:5432/genexamenes
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
restart: unless-stopped
frontend:
image: nginx:1.27-alpine
ports:
- "3000:80"
volumes:
- ./frontend:/usr/share/nginx/html:ro
restart: unless-stopped
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: genexamenes
POSTGRES_USER: genexamenes
POSTGRES_PASSWORD: genexamenes
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U genexamenes -d genexamenes"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
volumes:
postgres_data: