services: postgres: image: postgres:alpine environment: - POSTGRES_PASSWORD=password network_mode: host extra_hosts: - "host.docker.internal:host-gateway" volumes: - postgres_data:/var/lib/postgresql/data volumes: postgres_data: