version: "3.9" services: db: image: postgres:16-alpine environment: POSTGRES_DB: docflow POSTGRES_USER: docflow_user POSTGRES_PASSWORD: docflow_pass volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U docflow_user -d docflow"] interval: 5s timeout: 5s retries: 10 ports: - "5432:5432" backend: build: ./backend env_file: ./backend/.env environment: DB_HOST: db volumes: - ./storage:/app/storage ports: - "8000:8000" depends_on: db: condition: service_healthy frontend: image: node:20-alpine working_dir: /app volumes: - ./frontend:/app ports: - "4200:4200" command: sh -c "npm install && npx ng serve --host 0.0.0.0 --disable-host-check" volumes: pgdata: