操做很簡單,主要是進行界面的配置以及prometheus 服務的配置,
能夠和http://www.javashuo.com/article/p-kentdmps-bh.html &&
http://www.javashuo.com/article/p-ocrexwys-co.html 結合起來看html
version: "3" services: api: build: ./ ports: - "8080:8080" volumes: - "./web:/web" g: image: grafana/grafana ports: - "3000:3000" p: image: prom/prometheus volumes: - "./prometheus.yml:/etc/prometheus/prometheus.yml" ports: - "9090:9090"
scrape_configs: - job_name: nginx metrics_path: /status/format/prometheus static_configs: - targets: ['api:8080']
FROM dalongrong/lapis-1.7.0:metrics ENTRYPOINT [ "lapis","server" ]
local lapis = require("lapis") local app = lapis.Application() app:get("/", function() return "Welcome to Lapis dalongrong " .. require("lapis.version") end) app:get("/users", function() return "users" .. require("lapis.version") end) app:get("/apps", function() return "apps" .. require("lapis.version") end) app:get("/mobiles", function() return "mobiles" .. require("lapis.version") end) app:get("/paas", function() return "paas " .. require("lapis.version") end) app:get("/saas", function() return "saas " .. require("lapis.version") end) return app
docker-compose up -d
http://www.javashuo.com/article/p-kentdmps-bh.html
http://www.javashuo.com/article/p-ocrexwys-co.html
https://github.com/rongfengliang/lapis-dockernginx