mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 22:15:13 +00:00
119 lines
2.8 KiB
YAML
119 lines
2.8 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# --- MODIFICATION ---
|
|
# The local postgres service is commented out. Coolify will provide the database.
|
|
# postgres:
|
|
# image: postgres:15-alpine
|
|
# environment:
|
|
# POSTGRES_USER: ${DB_USER}
|
|
# POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
# POSTGRES_DB: ${DB_NAME}
|
|
# ports:
|
|
# - '${DB_PORT}:5432'
|
|
# volumes:
|
|
# - postgres_data:/var/lib/postgresql/data
|
|
# healthcheck:
|
|
# test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
|
|
# interval: 10s
|
|
# timeout: 5s
|
|
# retries: 5
|
|
# networks:
|
|
# - api.network
|
|
|
|
# This service will now run against the production database on deploy. Add import-data back into command for data import.
|
|
db-init:
|
|
build: .
|
|
env_file: .env
|
|
command: ["/nba_go"]
|
|
# --- MODIFICATION ---
|
|
# depends_on is removed. It will use the DB_HOST from environment variables.
|
|
networks:
|
|
- api.network
|
|
restart: "no"
|
|
|
|
api1:
|
|
build: .
|
|
env_file: .env
|
|
ports:
|
|
- '5001:5000'
|
|
# --- MODIFICATION ---
|
|
# depends_on is removed.
|
|
networks:
|
|
- api.network
|
|
restart: always
|
|
|
|
api2:
|
|
build: .
|
|
env_file: .env
|
|
ports:
|
|
- '5002:5000'
|
|
# --- MODIFICATION ---
|
|
# depends_on is removed.
|
|
networks:
|
|
- api.network
|
|
restart: always
|
|
|
|
api3:
|
|
build: .
|
|
env_file: .env
|
|
ports:
|
|
- '5003:5000'
|
|
# --- MODIFICATION ---
|
|
# depends_on is removed.
|
|
networks:
|
|
- api.network
|
|
restart: always
|
|
|
|
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
|
|
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
ports:
|
|
- '3001:3000'
|
|
environment:
|
|
- GF_SECURITY_ADMIN_PASSWORD=testing
|
|
volumes:
|
|
- './grafana/provisioning/datasources:/etc/grafana/provisioning/datasources'
|
|
- './grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards'
|
|
- './grafana/dashboards:/var/lib/grafana/dashboards'
|
|
- 'grafana_data:/var/lib/grafana'
|
|
networks:
|
|
- api.network
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
# --- MODIFICATION ---
|
|
# postgres_data volume is no longer needed.
|
|
prometheus_data:
|
|
grafana_data:
|
|
|
|
networks:
|
|
api.network: null |