mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 05:55:13 +00:00
79 lines
1.6 KiB
YAML
79 lines
1.6 KiB
YAML
version: '3.8'
|
|
services:
|
|
db-init:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
volumes:
|
|
- './data:/app/data'
|
|
command: /nba_go import-data
|
|
networks:
|
|
- api.network
|
|
api1:
|
|
volumes:
|
|
- './data:/app/data'
|
|
build: .
|
|
ports:
|
|
- '5001:5000'
|
|
restart: always
|
|
depends_on:
|
|
db-init:
|
|
condition: service_completed_successfully
|
|
networks:
|
|
- api.network
|
|
api2:
|
|
volumes:
|
|
- './data:/app/data'
|
|
build: .
|
|
ports:
|
|
- '5002:5000'
|
|
restart: always
|
|
depends_on:
|
|
db-init:
|
|
condition: service_completed_successfully
|
|
networks:
|
|
- api.network
|
|
api3:
|
|
volumes:
|
|
- './data:/app/data'
|
|
build: .
|
|
ports:
|
|
- '5003:5000'
|
|
restart: always
|
|
depends_on:
|
|
db-init:
|
|
condition: service_completed_successfully
|
|
networks:
|
|
- api.network
|
|
nginx:
|
|
image: 'nginx:stable'
|
|
volumes:
|
|
- './nginx/nginx.conf:/etc/nginx/nginx.conf:ro'
|
|
depends_on:
|
|
- api1
|
|
- api2
|
|
- api3
|
|
ports:
|
|
- '8080:8080'
|
|
networks:
|
|
- api.network
|
|
prometheus:
|
|
image: 'prom/prometheus:latest'
|
|
volumes:
|
|
- './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'
|
|
networks:
|
|
- api.network
|
|
restart: unless-stopped
|
|
volumes:
|
|
prometheus_data: null
|
|
networks:
|
|
api.network: null
|