services: db: image: postgres:14 environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=postgres volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 ports: - "5432:5432" app: build: context: . dockerfile: Dockerfile ports: - "3000:3000" environment: - DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres depends_on: db: condition: service_healthy ngrok: image: ngrok/ngrok:latest environment: NGROK_AUTHTOKEN: ${NGROK_AUTHTOKEN} command: http app:3000 ports: - "4040:4040" depends_on: - app volumes: postgres_data: