소스 검색

fix: docker

zhangchunrui 3 주 전
부모
커밋
4b157e4e8c
2개의 변경된 파일20개의 추가작업 그리고 22개의 파일을 삭제
  1. 16 0
      docker-compose.ea.yml
  2. 4 22
      src/lib/notifications/index.ts

+ 16 - 0
docker-compose.ea.yml

@@ -0,0 +1,16 @@
+services:
+  lfj-rebalancer:
+    build: .
+    restart: unless-stopped
+    volumes:
+      - ./data:/app/data
+    env_file:
+      - .env.local
+    environment:
+      - NODE_ENV=production
+    healthcheck:
+      test: ['CMD', 'curl', '-f', 'http://localhost:3000']
+      interval: 30s
+      timeout: 5s
+      retries: 3
+      start_period: 30s

+ 4 - 22
src/lib/notifications/index.ts

@@ -2,29 +2,11 @@ import { config } from '../config'
 import type { RebalanceResult } from '../engine/types'
 
 export async function sendNotification(
-  title: string,
-  body: string,
-  level: 'info' | 'warning' | 'error' = 'info',
+  _title: string,
+  _body: string,
+  _level: 'info' | 'warning' | 'error' = 'info',
 ): Promise<void> {
-  if (!config.notifications.enabled || !config.notifications.endpoint) return
-
-  try {
-    const { provider, endpoint } = config.notifications
-
-    switch (provider) {
-      case 'bark':
-        await sendBark(endpoint, title, body, level)
-        break
-      case 'ntfy':
-        await sendNtfy(endpoint, title, body, level)
-        break
-      case 'pushover':
-        await sendPushover(endpoint, title, body, level)
-        break
-    }
-  } catch (err) {
-    console.error('[notify] Failed to send notification:', err)
-  }
+  // Notifications disabled
 }
 
 async function sendBark(