mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 02:25:00 +00:00
fix(compose): Add explicit bridge network
This commit is contained in:
@@ -43,6 +43,8 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
- postgres
|
- postgres
|
||||||
# - mysql # Uncomment if using MySQL
|
# - mysql # Uncomment if using MySQL
|
||||||
|
networks:
|
||||||
|
- new-api-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "wget -q -O - http://localhost:3000/api/status | grep -o '\"success\":\\s*true' || exit 1"]
|
test: ["CMD-SHELL", "wget -q -O - http://localhost:3000/api/status | grep -o '\"success\":\\s*true' || exit 1"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -53,6 +55,8 @@ services:
|
|||||||
image: redis:latest
|
image: redis:latest
|
||||||
container_name: redis
|
container_name: redis
|
||||||
restart: always
|
restart: always
|
||||||
|
networks:
|
||||||
|
- new-api-network
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
@@ -64,6 +68,8 @@ services:
|
|||||||
POSTGRES_DB: new-api
|
POSTGRES_DB: new-api
|
||||||
volumes:
|
volumes:
|
||||||
- pg_data:/var/lib/postgresql/data
|
- pg_data:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
- new-api-network
|
||||||
# ports:
|
# ports:
|
||||||
# - "5432:5432" # Uncomment if you need to access PostgreSQL from outside Docker
|
# - "5432:5432" # Uncomment if you need to access PostgreSQL from outside Docker
|
||||||
|
|
||||||
@@ -76,9 +82,15 @@ services:
|
|||||||
# MYSQL_DATABASE: new-api
|
# MYSQL_DATABASE: new-api
|
||||||
# volumes:
|
# volumes:
|
||||||
# - mysql_data:/var/lib/mysql
|
# - mysql_data:/var/lib/mysql
|
||||||
|
# networks:
|
||||||
|
# - new-api-network
|
||||||
# ports:
|
# ports:
|
||||||
# - "3306:3306" # Uncomment if you need to access MySQL from outside Docker
|
# - "3306:3306" # Uncomment if you need to access MySQL from outside Docker
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pg_data:
|
pg_data:
|
||||||
# mysql_data:
|
# mysql_data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
new-api-network:
|
||||||
|
driver: bridge
|
||||||
|
|||||||
Reference in New Issue
Block a user