Просмотр исходного кода

chore: restrict database port exposure in docker-compose.yaml

- Updated the PostgreSQL service configuration to prevent external access to the database port, allowing only internal network access.
- Added comments for debugging instructions if local access is needed.
ding113 2 месяцев назад
Родитель
Сommit
909960bbac
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      docker-compose.yaml

+ 4 - 2
docker-compose.yaml

@@ -3,8 +3,10 @@ services:
     image: postgres:18
     container_name: claude-code-hub-db
     restart: unless-stopped
-    ports:
-      - "35432:5432"
+    # 不对外暴露数据库端口,仅允许容器内部网络访问
+    # 如需调试,可取消注释下行(仅绑定本机):
+    # ports:
+    #   - "127.0.0.1:35432:5432"
     env_file:
       - ./.env
     environment: