services: postgres: image: tensorchord/pgvecto-rs:pg14-v0.2.0 container_name: postgres restart: unless-stopped ports: - "${HOST_IP}:5432:5432" environment: - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} volumes: - ./data:/var/lib/postgresql/data networks: - database deploy: resources: limits: cpus: '2' memory: 2G healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"] interval: 30s timeout: 10s retries: 5 labels: - "autoheal=true" - "com.centurylinklabs.watchtower.enable=true" networks: database: external: true