瀏覽代碼

improved deployment

Rodja Trappe 1 年之前
父節點
當前提交
62a2600cff
共有 3 個文件被更改,包括 3 次插入4 次删除
  1. 0 2
      fly-entrypoint.sh
  2. 1 1
      fly.dockerfile
  3. 2 1
      prometheus.py

+ 0 - 2
fly-entrypoint.sh

@@ -7,6 +7,4 @@ if [[ ! -z "$SWAP" ]]; then
   swapon _swapfile
 fi
 
-free -hm
-df -h
 exec "$@"

+ 1 - 1
fly.dockerfile

@@ -4,7 +4,7 @@ LABEL maintainer="Zauberzeug GmbH <nicegui@zauberzeug.com>"
 
 RUN pip install itsdangerous prometheus_client isort docutils pandas plotly matplotlib requests
 
-RUN apt update && apt install curl -y
+RUN apt update && apt install -y curl 
 
 RUN curl -sSL https://install.python-poetry.org | python3 - && \
     cd /usr/local/bin && \

+ 2 - 1
prometheus.py

@@ -16,7 +16,8 @@ def start_monitor(app: FastAPI) -> None:
         logging.info('Prometheus not installed, skipping monitoring')
         return
 
-    visits = prometheus_client.Counter('page_visits', 'Number of real page visits', ['path', 'session', 'origin'])
+    visits = prometheus_client.Counter('nicegui_page_visits', 'Number of real page visits',
+                                       ['path', 'session', 'origin'])
 
     class PrometheusMiddleware(BaseHTTPMiddleware):