chore(deploy): 增强 Docker 构建与发布流程

- 新增 GitHub Actions Docker 工作流,自动执行前端检查、后端测试并发布 GHCR 镜像。
- 为单容器与多容器部署补充镜像配置、使用说明和环境变量示例。
- 优化各 Dockerfile 的构建缓存与镜像体积,提升构建速度并减少无关文件进入镜像。
This commit is contained in:
LanQin
2026-06-15 22:05:41 +08:00
parent 85fb05d031
commit 913a0ef420
13 changed files with 396 additions and 15 deletions
+5
View File
@@ -2,6 +2,7 @@ version: "3.9"
services:
api:
image: ${LANQIN_API_IMAGE:-lanqin-email-api:local}
build:
context: ..
dockerfile: deploy/api.Dockerfile
@@ -15,6 +16,7 @@ services:
restart: unless-stopped
web:
image: ${LANQIN_WEB_IMAGE:-lanqin-email-web:local}
build:
context: ..
dockerfile: deploy/web.Dockerfile
@@ -33,6 +35,7 @@ services:
restart: unless-stopped
postfix:
image: ${LANQIN_POSTFIX_IMAGE:-lanqin-email-postfix:local}
build:
context: ./postfix
env_file: .env
@@ -48,6 +51,7 @@ services:
restart: unless-stopped
dovecot:
image: ${LANQIN_DOVECOT_IMAGE:-lanqin-email-dovecot:local}
build:
context: ./dovecot
env_file: .env
@@ -59,6 +63,7 @@ services:
restart: unless-stopped
opendkim:
image: ${LANQIN_OPENDKIM_IMAGE:-lanqin-email-opendkim:local}
build:
context: ./opendkim
env_file: .env