diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index fcdbf529b..09c994f78 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3" +version: "3.3" services: backend: @@ -10,9 +10,9 @@ services: - queue - db env_file: - - ./backend.env + - backend.env ports: - - "7860:7860" + - "7860" volumes: - ../:/app - ./startup-backend.sh:/startup-backend.sh # Ensure the paths match @@ -58,6 +58,8 @@ services: command: celery -A langflow.worker.celery_app worker --loglevel=INFO healthcheck: test: "exit 0" + deploy: + replicas: 1 flower: # user: your-non-root-user @@ -87,9 +89,32 @@ services: depends_on: backend: condition: service_healthy - env_file: - ./frontend.env ports: - "80:80" restart: on-failure + + prometheus: + image: prom/prometheus:v2.37.9 + volumes: + - ./prometheus.yml:/etc/prometheus/prometheus.yml + command: + - "--config.file=/etc/prometheus/prometheus.yml" + ports: + - "9090:9090" + healthcheck: + test: "exit 0" + + grafana: + image: grafana/grafana:8.2.6 + depends_on: + prometheus: + condition: service_healthy + ports: + - "3000:3000" + volumes: + - grafana_data:/var/lib/grafana + +volumes: + grafana_data: diff --git a/deploy/prometheus.yml b/deploy/prometheus.yml new file mode 100644 index 000000000..1d53d5b5f --- /dev/null +++ b/deploy/prometheus.yml @@ -0,0 +1,11 @@ +global: + scrape_interval: 15s + evaluation_interval: 15s + +scrape_configs: + - job_name: prometheus + static_configs: + - targets: ["prometheus:9090"] + - job_name: flower + static_configs: + - targets: ["flower:5555"]