From f64b88b536ede7a6559d9aa0c89bed7267037e8a Mon Sep 17 00:00:00 2001 From: ChenKaiLiuG Date: Fri, 12 Dec 2025 11:14:52 +0800 Subject: [PATCH] Update --- config/non-used-dashboard-conf.yml | 33 ++++++++++ stack/dashboard.yml | 35 +++++------ stack/others/coolify-web.yml | 96 ++++++++++++++++++++++++++++++ 3 files changed, 145 insertions(+), 19 deletions(-) create mode 100644 config/non-used-dashboard-conf.yml create mode 100644 stack/others/coolify-web.yml diff --git a/config/non-used-dashboard-conf.yml b/config/non-used-dashboard-conf.yml new file mode 100644 index 0000000..37c5ab0 --- /dev/null +++ b/config/non-used-dashboard-conf.yml @@ -0,0 +1,33 @@ +--- +# 頁面設定 +pageInfo: + title: My Dashboard + description: Welcome to your new dashboard! + navLinks: + - title: GitHub + path: https://github.com/Lissy93/dashy + - title: Documentation + path: https://dashy.to/docs + +# 應用程式區塊 +sections: + - name: Getting Started + icon: fas fa-rocket + items: + - title: Dashy Documentation + description: Everything you need to know + icon: fas fa-book + url: https://dashy.to/docs + - title: Source Code + description: View on GitHub + icon: fab fa-github + url: https://github.com/Lissy93/dashy + +# 主題與樣式設定 +appConfig: + theme: colorful + layout: auto + iconSize: medium + language: en + editingPassword: "your_secure_password" + diff --git a/stack/dashboard.yml b/stack/dashboard.yml index 64f3a50..ddf8348 100644 --- a/stack/dashboard.yml +++ b/stack/dashboard.yml @@ -1,25 +1,22 @@ version: "3.8" services: - dashy: - image: lissy93/dashy:latest - container_name: Dashy - # 掛載您的 Dashy 配置檔案 - volumes: - - ./conf.yml:/app/user-data/conf.yml - - dashy_data:/app/user-data - ports: - - "9070:8080" - environment: - - NODE_ENV=production + homarr: + container_name: homarr + image: ghcr.io/ajnart/homarr:latest restart: unless-stopped - # 健康檢查 - healthcheck: - test: ['CMD', 'node', '/app/services/healthcheck'] - interval: 1m30s - timeout: 10s - retries: 3 - start_period: 40s + volumes: + - /mnt/data/External/dashboard/configs:/app/data/configs + - /mnt/data/External/dashboard/icons:/app/public/icons + - homarr_data:/data + ports: + - "9070:7575" + networks: + - webproxy volumes: - dashy_data: + homarr_data: + +networks: + webproxy: + external: true \ No newline at end of file diff --git a/stack/others/coolify-web.yml b/stack/others/coolify-web.yml new file mode 100644 index 0000000..be29dfc --- /dev/null +++ b/stack/others/coolify-web.yml @@ -0,0 +1,96 @@ +version: '3.8' + +services: + # --- Coolify 核心管理服務 --- + coolify: + image: ghcr.io/coollabsio/coolify:latest + container_name: coolify + restart: always + environment: + - APP_ID=core + - APP_ENV=production + - APP_NAME=Coolify + - APP_KEY=${MY_APP_KEY} + - DB_HOST=coolify-db + - DB_PORT=5432 + - DB_USERNAME=coolify + - DB_PASSWORD=${MY_DB_PASS} + - DB_DATABASE=coolify + - REDIS_HOST=coolify-redis + - REDIS_PASSWORD=${MY_REDIS_PASS} + # 重要:開啟調度器,確保它能管理 Docker + - COOLIFY_SCHEDULER_ENABLED=true + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /mnt/data/External/coolify_web/coolify_data:/data/coolify + - /mnt/data/External/coolify_web/coolify_ssh:/var/www/html/storage/app/ssh + ports: + # 這是 Coolify 的管理後台 UI + # 為了安全,我們這裡只映射到宿主機的高位端口,或者您可以註解掉,完全走 NPM + - "7900:8080" + depends_on: + - coolify-db + - coolify-redis + networks: + - coolify-infra + - webproxy # 加入您的跨 Stack 網橋 + + # --- Coolify 內建代理 (Traefik) --- + # 我們手動定義它,是為了強制它加入 webproxy 網路,並且不讓它佔用宿主機 80/443 + coolify-proxy: + image: traefik:latest + container_name: coolify-proxy + restart: always + command: + - "--api.dashboard=true" + - "--api.insecure=true" + - "--providers.docker=true" + - "--providers.docker.exposedbydefault=false" + # 關鍵:Traefik 在容器內部監聽 80,但不映射到宿主機 + - "--entrypoints.web.address=:80" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + networks: + - coolify-infra + - webproxy # 這樣 NPM 才能轉發流量給它 + ports: + # 這裡故意不映射 80:80 和 443:443 + # 只映射一個監控面板 port 供 debug (可選) + - "7800:8080" + + # --- 資料庫依賴 --- + coolify-db: + image: postgres:15-alpine + container_name: coolify-db + restart: always + environment: + - POSTGRES_USER=coolify + - POSTGRES_PASSWORD=${MY_DB_PASS} + - POSTGRES_DB=coolify + volumes: + - coolify-db-data:/var/lib/postgresql/data + networks: + - coolify-infra + + coolify-redis: + image: redis:alpine + container_name: coolify-redis + restart: always + command: redis-server --requirepass ${MY_REDIS_PASS} + volumes: + - coolify-redis-data:/data + networks: + - coolify-infra + +# --- 網路設定 --- +networks: + coolify-infra: + driver: bridge + webproxy: + external: true + name: webproxy + +# --- 數據卷 --- +volumes: + coolify-db-data: + coolify-redis-data: \ No newline at end of file