mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 22:15:13 +00:00
95 lines
2.3 KiB
YAML
95 lines
2.3 KiB
YAML
# Note: The 'version' attribute is obsolete in modern Docker Compose and has been removed.
|
|
services:
|
|
# --- The local postgres service is disabled for production deployment ---
|
|
# postgres:
|
|
# ...
|
|
# Add "import-data" back into commands for DB import.
|
|
db-init:
|
|
build: .
|
|
env_file: .env
|
|
command: ["/nba_go"]
|
|
networks:
|
|
- api.network
|
|
restart: "no"
|
|
|
|
api1:
|
|
build: .
|
|
env_file: .env
|
|
# --- MODIFICATION ---
|
|
# The API services do not need to be exposed directly.
|
|
# Nginx will handle routing to them internally.
|
|
networks:
|
|
- api.network
|
|
restart: always
|
|
|
|
api2:
|
|
build: .
|
|
env_file: .env
|
|
networks:
|
|
- api.network
|
|
restart: always
|
|
|
|
api3:
|
|
build: .
|
|
env_file: .env
|
|
networks:
|
|
- api.network
|
|
restart: always
|
|
|
|
nginx:
|
|
image: 'nginx:stable'
|
|
volumes:
|
|
- './nginx/nginx.conf:/etc/nginx/nginx.conf:ro'
|
|
depends_on:
|
|
- api1
|
|
- api2
|
|
- api3
|
|
# --- MODIFICATION ---
|
|
# We EXPOSE the container port, but do not PUBLISH it to the host.
|
|
# Coolify's proxy will connect to this internal port.
|
|
ports:
|
|
- "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'
|
|
# --- MODIFICATION ---
|
|
# Expose the internal port for the proxy.
|
|
ports:
|
|
- "9090"
|
|
networks:
|
|
- api.network
|
|
restart: unless-stopped
|
|
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
ports:
|
|
# --- MODIFICATION ---
|
|
# Expose the internal port for the proxy.
|
|
- "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:
|
|
prometheus_data:
|
|
grafana_data:
|
|
|
|
networks:
|
|
api.network: null |