mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
deploy: use named volumes for certs/html/acme, keep data bind mount
certs, html and acme are shared across nginx-proxy, acme-companion and the acme-ip service, so they become named volumes (dropping the nginx- prefix). The vhost.d mount is removed: acme-companion only needs it with ACME_HTTP_CHALLENGE_LOCATION=true or letsencrypt_user_data, and users who customize nginx config can mount their own. ./data stays a bind mount so the SQLite state stays directly backup-able. README updated.
This commit is contained in:
@@ -53,8 +53,8 @@ Let's Encrypt 支持为公网 IP 签发证书(2026 年起可用,有效期约
|
|||||||
command: daemon
|
command: daemon
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx-certs:/acme.sh
|
- certs:/acme.sh
|
||||||
- ./nginx-html:/usr/share/nginx/html
|
- html:/usr/share/nginx/html
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
networks: [proxy]
|
networks: [proxy]
|
||||||
```
|
```
|
||||||
@@ -112,6 +112,6 @@ Telegram 只接受 443/80/88/8443 端口。
|
|||||||
|
|
||||||
## 备注
|
## 备注
|
||||||
|
|
||||||
- 数据持久化于 `data/task_queue.db`,容器部署需挂载该目录
|
- 数据持久化于 `data/task_queue.db`,compose 部署使用 bind mount `./data`(保持目录形式便于备份)
|
||||||
- 运行环境需安装 ffmpeg(Docker 镜像已内置)
|
- 运行环境需安装 ffmpeg(Docker 镜像已内置)
|
||||||
- 测试:`cargo test --workspace`
|
- 测试:`cargo test --workspace`
|
||||||
|
|||||||
@@ -7,9 +7,8 @@ services:
|
|||||||
- '443:443'
|
- '443:443'
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||||
- ./nginx-certs:/etc/nginx/certs:ro
|
- certs:/etc/nginx/certs:ro
|
||||||
- ./nginx-vhost.d:/etc/nginx/vhost.d:ro
|
- html:/usr/share/nginx/html:ro
|
||||||
- ./nginx-html:/usr/share/nginx/html:ro
|
|
||||||
networks: [proxy]
|
networks: [proxy]
|
||||||
labels:
|
labels:
|
||||||
- 'com.github.nginx-proxy.nginx=true'
|
- 'com.github.nginx-proxy.nginx=true'
|
||||||
@@ -22,10 +21,9 @@ services:
|
|||||||
DEFAULT_EMAIL: 'admin@yoursfunny.top'
|
DEFAULT_EMAIL: 'admin@yoursfunny.top'
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
- ./nginx-certs:/etc/nginx/certs:rw
|
- certs:/etc/nginx/certs:rw
|
||||||
- ./nginx-vhost.d:/etc/nginx/vhost.d:rw
|
- html:/usr/share/nginx/html:rw
|
||||||
- ./nginx-html:/usr/share/nginx/html:rw
|
- acme:/etc/acme.sh
|
||||||
- ./nginx-acme:/etc/acme.sh
|
|
||||||
networks: [proxy]
|
networks: [proxy]
|
||||||
container_name: acme-companion
|
container_name: acme-companion
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -58,6 +56,11 @@ services:
|
|||||||
- nginx-proxy
|
- nginx-proxy
|
||||||
container_name: tgxmb
|
container_name: tgxmb
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
certs:
|
||||||
|
html:
|
||||||
|
acme:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
name: proxy
|
name: proxy
|
||||||
|
|||||||
Reference in New Issue
Block a user