913a0ef420
- 新增 GitHub Actions Docker 工作流,自动执行前端检查、后端测试并发布 GHCR 镜像。 - 为单容器与多容器部署补充镜像配置、使用说明和环境变量示例。 - 优化各 Dockerfile 的构建缓存与镜像体积,提升构建速度并减少无关文件进入镜像。
79 lines
1.6 KiB
YAML
79 lines
1.6 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
api:
|
|
image: ${LANQIN_API_IMAGE:-lanqin-email-api:local}
|
|
build:
|
|
context: ..
|
|
dockerfile: deploy/api.Dockerfile
|
|
env_file: .env
|
|
volumes:
|
|
- lanqin-data:/data
|
|
- maildata:/var/mail/vhosts:ro
|
|
depends_on:
|
|
- dovecot
|
|
- postfix
|
|
restart: unless-stopped
|
|
|
|
web:
|
|
image: ${LANQIN_WEB_IMAGE:-lanqin-email-web:local}
|
|
build:
|
|
context: ..
|
|
dockerfile: deploy/web.Dockerfile
|
|
restart: unless-stopped
|
|
|
|
nginx:
|
|
image: nginx:1.27-alpine
|
|
volumes:
|
|
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
depends_on:
|
|
- api
|
|
- web
|
|
restart: unless-stopped
|
|
|
|
postfix:
|
|
image: ${LANQIN_POSTFIX_IMAGE:-lanqin-email-postfix:local}
|
|
build:
|
|
context: ./postfix
|
|
env_file: .env
|
|
volumes:
|
|
- lanqin-data:/data
|
|
- maildata:/var/mail/vhosts
|
|
ports:
|
|
- "25:25"
|
|
- "587:587"
|
|
depends_on:
|
|
- dovecot
|
|
- opendkim
|
|
restart: unless-stopped
|
|
|
|
dovecot:
|
|
image: ${LANQIN_DOVECOT_IMAGE:-lanqin-email-dovecot:local}
|
|
build:
|
|
context: ./dovecot
|
|
env_file: .env
|
|
volumes:
|
|
- lanqin-data:/data
|
|
- maildata:/var/mail/vhosts
|
|
ports:
|
|
- "993:993"
|
|
restart: unless-stopped
|
|
|
|
opendkim:
|
|
image: ${LANQIN_OPENDKIM_IMAGE:-lanqin-email-opendkim:local}
|
|
build:
|
|
context: ./opendkim
|
|
env_file: .env
|
|
volumes:
|
|
- lanqin-data:/data:ro
|
|
- dkim-keys:/etc/opendkim/keys
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
lanqin-data:
|
|
maildata:
|
|
dkim-keys:
|