# docker-compose.yml version: '3' services: api: build: . ports: - "8000:8000" depends_on: - db environment: - POSTGRES_SERVER=db - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=household volumes: - ./:/app/ db: image: postgres:15 volumes: - postgres_data:/var/lib/postgresql/data/ environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=household ports: - "5432:5432" volumes: postgres_data: