deploy: 适配现有 Caddy 配置(gitea 域名路径反代 + 共享网络)

This commit is contained in:
root
2026-10-16 11:33:13 +08:00
parent 2660dc6fa9
commit 5b48fadc46
2 changed files with 39 additions and 27 deletions
+11 -17
View File
@@ -2,23 +2,17 @@ services:
internlog-sync:
build: .
container_name: internlog-sync
ports:
- "3780:3780"
restart: unless-stopped
volumes:
- ./data:/app/data
restart: unless-stopped
networks:
- proxy-net
# 可选:Caddy 自动 HTTPS。若宿主机已有 Caddy/nginx 占用 80/443,请改用
# 现有反代添加站点块(见 DEPLOY.md),不要启用本段。
#
# caddy:
# image: caddy:2-alpine
# container_name: internlog-caddy
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./Caddyfile:/etc/caddy/Caddyfile:ro
# - ./caddy_data:/data
# - ./caddy_config:/config
# restart: unless-stopped
# 让 Caddy 能用容器名 internlog-sync 直接访问本服务。
# 请先查出 Caddy 与 gitea 所在的共享网络名:
# docker inspect gitea --format '{{range $k,$v := .NetworkSettings.Networks}}{{$k}} {{end}}'
# 把下面 name 替换成查到的网络名。若 Caddy 与本服务同属一个 compose 项目则可删掉 networks 配置。
networks:
proxy-net:
name: proxy-net
external: true