Fix all network bridge

This commit is contained in:
ChenKaiLiuG
2025-12-24 16:04:09 +08:00
parent a43a6bf51e
commit 2f01362e68
4 changed files with 53 additions and 5 deletions

View File

@@ -5,7 +5,9 @@ services:
image: cloudflare/cloudflared:latest image: cloudflare/cloudflared:latest
container_name: cloudflared container_name: cloudflared
restart: unless-stopped restart: unless-stopped
command: tunnel --no-autoupdate run --token eyJhIjoiYTNmZGEzMTE5ZWY3NWQ0ZDFmODMzMjhiMTdiNjQwZjAiLCJ0IjoiNWUxNDkxMjItZjZkOC00ZTdiLTk4Y2EtOWMyZGJmZGVlZjYxIiwicyI6IlptWTJNREF4Wm1RdE5Ua3dNaTAwTURBM0xUazVNemt0TkRreE1tRXlaRFV5TlRaayJ9 command: tunnel --no-autoupdate run --token ${CLOUDFLARE_TOKEN}
networks:
- cloudflare_network
volumes: volumes:
- /opt/cloudflare/cloudflared:/etc/cloudflared - /opt/cloudflare/cloudflared:/etc/cloudflared
@@ -17,6 +19,9 @@ services:
- "80:80" - "80:80"
- "81:81" - "81:81"
- "443:443" - "443:443"
networks:
- cloudflare_network
- webproxy
volumes: volumes:
- /opt/cloudflare/npm/data:/data - /opt/cloudflare/npm/data:/data
- /opt/cloudflare/npm/letsencrypt:/etc/letsencrypt - /opt/cloudflare/npm/letsencrypt:/etc/letsencrypt
@@ -26,6 +31,14 @@ services:
container_name: filebrowser container_name: filebrowser
restart: unless-stopped restart: unless-stopped
ports: ports:
- "8080:80" - "18080:80"
networks:
- cloudflare_network
volumes: volumes:
- /opt/cloudflare/files:/srv 31,17 底端 - /opt/cloudflare/files:/srv
networks:
cloudflare_network:
driver: bridge
webproxy:
external: true

View File

@@ -19,7 +19,9 @@ services:
mail__options__auth__pass: ${MAIL_PASSWORD} # 應用程式專用密碼 mail__options__auth__pass: ${MAIL_PASSWORD} # 應用程式專用密碼
# NODE_ENV: production # NODE_ENV: production
TRUST_PROXY: 1 # ← 告訴 Ghost 代理存在,使用 X-Forwarded-Proto 判斷 HTTPS TRUST_PROXY: 1 # ← 告訴 Ghost 代理存在,使用 X-Forwarded-Proto 判斷 HTTPS
networks:
- ghost_network
- webproxy
volumes: volumes:
- /mnt/data/External/ghost_forum_data/content:/var/lib/ghost/content - /mnt/data/External/ghost_forum_data/content:/var/lib/ghost/content
depends_on: depends_on:
@@ -33,8 +35,16 @@ services:
# 從 .env 檔案中讀取密碼 # 從 .env 檔案中讀取密碼
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ghost MYSQL_DATABASE: ghost
networks:
- ghost_network
volumes: volumes:
- ghost_forum_db:/var/lib/mysql - ghost_forum_db:/var/lib/mysql
volumes: volumes:
ghost_forum_db: ghost_forum_db:
networks:
ghost_network:
driver: bridge
webproxy:
external: true

View File

@@ -5,6 +5,8 @@ services:
image: mariadb:10.6 image: mariadb:10.6
container_name: nextcloud_db container_name: nextcloud_db
restart: unless-stopped restart: unless-stopped
networks:
- nextcloud_network
volumes: volumes:
- nextcloud_db:/var/lib/mysql - nextcloud_db:/var/lib/mysql
environment: environment:
@@ -20,6 +22,9 @@ services:
ports: ports:
- "6900:80" # HTTP (內網) - "6900:80" # HTTP (內網)
- "6950:443" # HTTPS (供反向代理用,可透過 cert 處理) - "6950:443" # HTTPS (供反向代理用,可透過 cert 處理)
networks:
- nextcloud_network
- webproxy
volumes: volumes:
- /mnt/data/External/Nextcloud_files:/var/www/html/data - /mnt/data/External/Nextcloud_files:/var/www/html/data
- nextcloud_data:/var/www/html/ - nextcloud_data:/var/www/html/
@@ -36,3 +41,9 @@ services:
volumes: volumes:
nextcloud_db: nextcloud_db:
nextcloud_data: nextcloud_data:
networks:
nextcloud_network:
driver: bridge
webproxy:
external: true

View File

@@ -10,6 +10,9 @@ services:
- /mnt/data/External/ollama_model:/ollama_models - /mnt/data/External/ollama_model:/ollama_models
ports: ports:
- "11434:11434" - "11434:11434"
networks:
- llama_network
environment: environment:
- OLLAMA_BASE_URL=http://ollama:11434 - OLLAMA_BASE_URL=http://ollama:11434
deploy: deploy:
@@ -30,11 +33,16 @@ services:
- "9060:8080" - "9060:8080"
environment: environment:
- OLLAMA_BASE_URL=http://ollama:11434 - OLLAMA_BASE_URL=http://ollama:11434
networks:
- llama_network
- webproxy
ollama-monitor: ollama-monitor:
image: docker:cli image: docker:cli
container_name: ollama-monitor container_name: ollama-monitor
restart: always restart: always
networks:
- llama_network
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- /mnt/data/External/ollama_monitor/monitor.sh:/monitor.sh:ro - /mnt/data/External/ollama_monitor/monitor.sh:/monitor.sh:ro
@@ -44,4 +52,10 @@ services:
volumes: volumes:
ollama-data: ollama-data:
open-webui-data: open-webui-data:
networks:
llama_network:
driver: bridge
webproxy:
external: true