version: '3.8' services: gorz: build: . ports: - "8080:8080" - "9090:9090" volumes: - ./examples/config.yaml:/app/config.yaml environment: - GORZ_CONFIG=/app/config.yaml restart: unless-stopped healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s networks: - gorz-network # Example web application to proxy to webapp: image: nginxdemos/hello:plain-text ports: - "3000:80" networks: - gorz-network healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80"] interval: 30s timeout: 10s retries: 3 start_period: 10s # Another example application api: image: nginxdemos/hello:plain-text ports: - "3001:80" networks: - gorz-network healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80"] interval: 30s timeout: 10s retries: 3 start_period: 10s # Prometheus for metrics collection prometheus: image: prom/prometheus:latest ports: - "9091:9090" volumes: - ./examples/prometheus.yml:/etc/prometheus/prometheus.yml - prometheus-data:/prometheus command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' - '--web.console.libraries=/etc/prometheus/console_libraries' - '--web.console.templates=/etc/prometheus/consoles' - '--storage.tsdb.retention.time=200h' - '--web.enable-lifecycle' networks: - gorz-network restart: unless-stopped # Grafana for metrics visualization grafana: image: grafana/grafana:latest ports: - "3000:3000" volumes: - grafana-data:/var/lib/grafana environment: - GF_SECURITY_ADMIN_PASSWORD=admin networks: - gorz-network restart: unless-stopped networks: gorz-network: driver: bridge volumes: prometheus-data: grafana-data: