diff --git a/docker-compose.yml b/docker-compose.yml index a9d00967c..3c56faf3f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,6 +43,8 @@ services: - redis - postgres # - mysql # Uncomment if using MySQL + networks: + - new-api-network healthcheck: test: ["CMD-SHELL", "wget -q -O - http://localhost:3000/api/status | grep -o '\"success\":\\s*true' || exit 1"] interval: 30s @@ -53,6 +55,8 @@ services: image: redis:latest container_name: redis restart: always + networks: + - new-api-network postgres: image: postgres:15 @@ -64,6 +68,8 @@ services: POSTGRES_DB: new-api volumes: - pg_data:/var/lib/postgresql/data + networks: + - new-api-network # ports: # - "5432:5432" # Uncomment if you need to access PostgreSQL from outside Docker @@ -76,9 +82,15 @@ services: # MYSQL_DATABASE: new-api # volumes: # - mysql_data:/var/lib/mysql +# networks: +# - new-api-network # ports: # - "3306:3306" # Uncomment if you need to access MySQL from outside Docker volumes: pg_data: # mysql_data: + +networks: + new-api-network: + driver: bridge