services: db: image: postgres:16-alpine environment: POSTGRES_DB: family_tree POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres volumes: - db_data:/var/lib/postgresql/data - ./db/schema.sql:/docker-entrypoint-initdb.d/01_schema.sql:ro - ./db/seed.sql:/docker-entrypoint-initdb.d/02_seed.sql:ro ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 3s retries: 10 backend: build: ./backend environment: PORT: 4000 DATABASE_URL: postgres://postgres:postgres@db:5432/family_tree JWT_SECRET: please_change_this_secret CORS_ORIGIN: http://localhost:3000 depends_on: db: condition: service_healthy ports: - "4000:4000" frontend: build: ./frontend depends_on: - backend ports: - "3000:80" volumes: db_data: