🚀 feat(docker-compose.yml): upgrade docker-compose version to 3.3 for compatibility with newer features and syntax
🔧 chore(docker-compose.yml): update backend.env file path to remove leading './' for consistency 🔧 chore(docker-compose.yml): remove explicit port mapping for backend service to use the default port 🔧 chore(docker-compose.yml): add deploy configuration for celery worker service to ensure only one replica is deployed 🔧 chore(docker-compose.yml): add prometheus and grafana services with necessary configurations and dependencies 📝 docs(prometheus.yml): add prometheus configuration file with scrape targets for prometheus and flower services
This commit is contained in:
parent
afcd1f847c
commit
2d85ae9dd4
2 changed files with 40 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
version: "3"
|
version: "3.3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
backend:
|
backend:
|
||||||
|
|
@ -10,9 +10,9 @@ services:
|
||||||
- queue
|
- queue
|
||||||
- db
|
- db
|
||||||
env_file:
|
env_file:
|
||||||
- ./backend.env
|
- backend.env
|
||||||
ports:
|
ports:
|
||||||
- "7860:7860"
|
- "7860"
|
||||||
volumes:
|
volumes:
|
||||||
- ../:/app
|
- ../:/app
|
||||||
- ./startup-backend.sh:/startup-backend.sh # Ensure the paths match
|
- ./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
|
command: celery -A langflow.worker.celery_app worker --loglevel=INFO
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: "exit 0"
|
test: "exit 0"
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
|
||||||
flower:
|
flower:
|
||||||
# user: your-non-root-user
|
# user: your-non-root-user
|
||||||
|
|
@ -87,9 +89,32 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
backend:
|
backend:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
env_file:
|
env_file:
|
||||||
- ./frontend.env
|
- ./frontend.env
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
restart: on-failure
|
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:
|
||||||
|
|
|
||||||
11
deploy/prometheus.yml
Normal file
11
deploy/prometheus.yml
Normal file
|
|
@ -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"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue