mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 22:15:13 +00:00
docker compose changes
This commit is contained in:
+16
-40
@@ -1,33 +1,13 @@
|
|||||||
version: '3.8'
|
# Note: The 'version' attribute is obsolete in modern Docker Compose and has been removed.
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# --- MODIFICATION ---
|
# --- The local postgres service is disabled for production deployment ---
|
||||||
# The local postgres service is commented out. Coolify will provide the database.
|
|
||||||
# postgres:
|
# 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:
|
db-init:
|
||||||
build: .
|
build: .
|
||||||
env_file: .env
|
env_file: .env
|
||||||
command: ["/nba_go"]
|
command: ["/nba_go", "import-data"]
|
||||||
# --- MODIFICATION ---
|
|
||||||
# depends_on is removed. It will use the DB_HOST from environment variables.
|
|
||||||
networks:
|
networks:
|
||||||
- api.network
|
- api.network
|
||||||
restart: "no"
|
restart: "no"
|
||||||
@@ -35,10 +15,9 @@ services:
|
|||||||
api1:
|
api1:
|
||||||
build: .
|
build: .
|
||||||
env_file: .env
|
env_file: .env
|
||||||
ports:
|
|
||||||
- '5001:5000'
|
|
||||||
# --- MODIFICATION ---
|
# --- MODIFICATION ---
|
||||||
# depends_on is removed.
|
# 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
|
||||||
@@ -46,10 +25,6 @@ services:
|
|||||||
api2:
|
api2:
|
||||||
build: .
|
build: .
|
||||||
env_file: .env
|
env_file: .env
|
||||||
ports:
|
|
||||||
- '5002:5000'
|
|
||||||
# --- MODIFICATION ---
|
|
||||||
# depends_on is removed.
|
|
||||||
networks:
|
networks:
|
||||||
- api.network
|
- api.network
|
||||||
restart: always
|
restart: always
|
||||||
@@ -57,10 +32,6 @@ services:
|
|||||||
api3:
|
api3:
|
||||||
build: .
|
build: .
|
||||||
env_file: .env
|
env_file: .env
|
||||||
ports:
|
|
||||||
- '5003:5000'
|
|
||||||
# --- MODIFICATION ---
|
|
||||||
# depends_on is removed.
|
|
||||||
networks:
|
networks:
|
||||||
- api.network
|
- api.network
|
||||||
restart: always
|
restart: always
|
||||||
@@ -73,8 +44,11 @@ services:
|
|||||||
- 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'
|
- "8080"
|
||||||
networks:
|
networks:
|
||||||
- api.network
|
- api.network
|
||||||
|
|
||||||
@@ -88,8 +62,10 @@ services:
|
|||||||
- '--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'
|
- "9090"
|
||||||
networks:
|
networks:
|
||||||
- api.network
|
- api.network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -97,7 +73,9 @@ services:
|
|||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
ports:
|
ports:
|
||||||
- '3001:3000'
|
# --- MODIFICATION ---
|
||||||
|
# Expose the internal port for the proxy.
|
||||||
|
- "3000"
|
||||||
environment:
|
environment:
|
||||||
- GF_SECURITY_ADMIN_PASSWORD=testing
|
- GF_SECURITY_ADMIN_PASSWORD=testing
|
||||||
volumes:
|
volumes:
|
||||||
@@ -110,8 +88,6 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
# --- MODIFICATION ---
|
|
||||||
# postgres_data volume is no longer needed.
|
|
||||||
prometheus_data:
|
prometheus_data:
|
||||||
grafana_data:
|
grafana_data:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user