mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 14:05:13 +00:00
docker compose updates
This commit is contained in:
+13
-22
@@ -1,12 +1,8 @@
|
|||||||
# Note: The 'version' attribute is obsolete in modern Docker Compose and has been removed.
|
# docker-compose.yml - Final Version Using Server-Side Volumes
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# --- The local postgres service is disabled for production deployment ---
|
|
||||||
# postgres:
|
|
||||||
# ...
|
|
||||||
# Add "import-data" back into commands for DB import.
|
|
||||||
db-init:
|
db-init:
|
||||||
build: .
|
build: .
|
||||||
env_file: .env
|
|
||||||
command: ["/nba_go"]
|
command: ["/nba_go"]
|
||||||
networks:
|
networks:
|
||||||
- api.network
|
- api.network
|
||||||
@@ -14,24 +10,18 @@ services:
|
|||||||
|
|
||||||
api1:
|
api1:
|
||||||
build: .
|
build: .
|
||||||
env_file: .env
|
|
||||||
# --- MODIFICATION ---
|
|
||||||
# The API services do not need to be exposed directly.
|
|
||||||
# Nginx will handle routing to them internally.
|
|
||||||
networks:
|
networks:
|
||||||
- api.network
|
- api.network
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
api2:
|
api2:
|
||||||
build: .
|
build: .
|
||||||
env_file: .env
|
|
||||||
networks:
|
networks:
|
||||||
- api.network
|
- api.network
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
api3:
|
api3:
|
||||||
build: .
|
build: .
|
||||||
env_file: .env
|
|
||||||
networks:
|
networks:
|
||||||
- api.network
|
- api.network
|
||||||
restart: always
|
restart: always
|
||||||
@@ -39,14 +29,13 @@ services:
|
|||||||
nginx:
|
nginx:
|
||||||
image: 'nginx:stable'
|
image: 'nginx:stable'
|
||||||
volumes:
|
volumes:
|
||||||
- './nginx:/etc/nginx:ro'
|
# --- MODIFICATION ---
|
||||||
|
# Point to the absolute path on the Coolify server.
|
||||||
|
- '/data/nba-go-config/nginx:/etc/nginx:ro'
|
||||||
depends_on:
|
depends_on:
|
||||||
- api1
|
- api1
|
||||||
- api2
|
- api2
|
||||||
- api3
|
- 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:
|
ports:
|
||||||
- "8080"
|
- "8080"
|
||||||
networks:
|
networks:
|
||||||
@@ -55,15 +44,15 @@ services:
|
|||||||
prometheus:
|
prometheus:
|
||||||
image: 'prom/prometheus:latest'
|
image: 'prom/prometheus:latest'
|
||||||
volumes:
|
volumes:
|
||||||
- './prometheus:/etc/prometheus'
|
# --- MODIFICATION ---
|
||||||
|
# Point to the absolute path on the Coolify server.
|
||||||
|
- '/data/nba-go-config/prometheus:/etc/prometheus'
|
||||||
- 'prometheus_data:/prometheus'
|
- 'prometheus_data:/prometheus'
|
||||||
command:
|
command:
|
||||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||||
- '--storage.tsdb.path=/prometheus'
|
- '--storage.tsdb.path=/prometheus'
|
||||||
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
||||||
- '--web.console.templates=/etc/prometheus/consoles'
|
- '--web.console.templates=/etc/prometheus/consoles'
|
||||||
# --- MODIFICATION ---
|
|
||||||
# Expose the internal port for the proxy.
|
|
||||||
ports:
|
ports:
|
||||||
- "9090"
|
- "9090"
|
||||||
networks:
|
networks:
|
||||||
@@ -73,13 +62,15 @@ services:
|
|||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
ports:
|
ports:
|
||||||
# --- MODIFICATION ---
|
|
||||||
# Expose the internal port for the proxy.
|
|
||||||
- "3000"
|
- "3000"
|
||||||
environment:
|
environment:
|
||||||
- GF_SECURITY_ADMIN_PASSWORD=testing
|
- GF_SECURITY_ADMIN_PASSWORD=testing
|
||||||
volumes:
|
volumes:
|
||||||
- './grafana/provisioning:/etc/grafana/provisioning'
|
# --- MODIFICATION ---
|
||||||
|
# Point to the absolute path on the Coolify server.
|
||||||
|
- '/data/nba-go-config/grafana/provisioning:/etc/grafana/provisioning'
|
||||||
|
# This volume for user-created dashboards can remain relative or be removed
|
||||||
|
# if you only manage dashboards via provisioning.
|
||||||
- './grafana/dashboards:/var/lib/grafana/dashboards'
|
- './grafana/dashboards:/var/lib/grafana/dashboards'
|
||||||
- 'grafana_data:/var/lib/grafana'
|
- 'grafana_data:/var/lib/grafana'
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Reference in New Issue
Block a user