mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 14:05:13 +00:00
tests running
This commit is contained in:
+26
-33
@@ -1,85 +1,78 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
db-init:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
command: "/nba_go import-data"
|
||||
|
||||
- './data:/app/data'
|
||||
command: /nba_go import-data
|
||||
networks:
|
||||
- api.network
|
||||
api1:
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
- './data:/app/data'
|
||||
build: .
|
||||
ports:
|
||||
- "5001:5000"
|
||||
- '5001:5000'
|
||||
restart: always
|
||||
depends_on:
|
||||
db-init:
|
||||
condition: service_completed_successfully
|
||||
networks:
|
||||
- api.network
|
||||
|
||||
# Add the same depends_on configuration for api2 and api3
|
||||
api2:
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
- './data:/app/data'
|
||||
build: .
|
||||
ports:
|
||||
- "5002:5000"
|
||||
- '5002:5000'
|
||||
restart: always
|
||||
depends_on:
|
||||
db-init:
|
||||
condition: service_completed_successfully
|
||||
networks:
|
||||
- api.network
|
||||
|
||||
api3:
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
- './data:/app/data'
|
||||
build: .
|
||||
ports:
|
||||
- "5003:5000"
|
||||
- '5003:5000'
|
||||
restart: always
|
||||
depends_on:
|
||||
db-init:
|
||||
condition: service_completed_successfully
|
||||
networks:
|
||||
- api.network
|
||||
|
||||
# Nginx load balancer
|
||||
nginx:
|
||||
image: nginx:stable
|
||||
image: 'nginx:stable'
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- './nginx/nginx.conf:/etc/nginx/nginx.conf:ro'
|
||||
depends_on:
|
||||
- api1
|
||||
- api2
|
||||
- api3
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- '8080:8080'
|
||||
networks:
|
||||
- api.network
|
||||
|
||||
# Prometheus for metrics
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
image: 'prom/prometheus:latest'
|
||||
volumes:
|
||||
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- './prometheus/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'
|
||||
ports:
|
||||
- "9090:9090"
|
||||
- '9090:9090'
|
||||
networks:
|
||||
- api.network
|
||||
|
||||
# Grafana for dashboards
|
||||
grafana:
|
||||
image: grafana/grafana
|
||||
ports:
|
||||
- "3001:3000"
|
||||
networks:
|
||||
- api.network
|
||||
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
prometheus_data: null
|
||||
networks:
|
||||
api.network:
|
||||
api.network: null
|
||||
|
||||
Reference in New Issue
Block a user