version: "2.4" secrets: nginx-crt: file: ../nginx-repo.crt nginx-key: file: ../nginx-repo.key services: nginx-plus: container_name: nginx-plus image: nginx-plus build: context: . dockerfile: ./Dockerfile secrets: - nginx-crt - nginx-key args: NGINX_PLUS_VERSION: 31 volumes: - ./nginx.conf:/etc/nginx/nginx.conf ports: - "8080-8081:8080-8081" nginx-prometheus-exporter: container_name: nginx-prometheus-exporter image: docker.io/nginx/nginx-prometheus-exporter:1.1.0 environment: - NGINX_PLUS=true - SCRAPE_URI=http://nginx-plus:8081/plusapi/ ports: - "9113:9113" depends_on: - nginx-plus