Files
pruebas-automatizacion-desa…/compose.yaml

41 lines
921 B
YAML

services:
backend:
build:
context: ./
target: backend
expose:
- 3000
ports:
- 3000:${PORT}
env_file:
- ".env"
depends_on:
postgresql:
condition: service_healthy
restart: true
develop:
watch:
- path: ./src
action: sync
target: /usr/local/app/src
- path: ./backend/package.json
action: rebuild
postgresql:
image: postgres:16.1
ports:
- 5432:${POSTGRES_PORT}
volumes:
- ./sql-data/:/var/lib/postgres/data
- ./deployment/database/test.sql:/docker-entrypoint-initdb.d/init.sql
environment:
POSTGRES_PASSWORD: 1234
POSTGRES_USER: postgres
POSTGRES_DB: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s