Files
ca_auto_table/back/compose.yml
2025-11-20 22:49:08 +08:00

30 lines
931 B
YAML
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

services:
# 容器服务名称
ca_auto_table:
# 容器名称
container_name: ca_auto_table
build:
# 在当前目录下寻找Dockerfile文件并构建镜像
context: .
dockerfile: Dockerfile
# 重启策略
restart: always
# 挂载目录 本地化容器数据
# 这里挂载了本地当前目录的app目录到容器的/app目录
volumes:
- .:/app
# 环境变量 可以在Dockerfile中配置环境变量应用中获取
environment:
- NAME=ca_auto_table
- TZ=Asia/Shanghai
# 端口映射 容器端口映射到主机端口
ports:
- "6060:6060"
# 日志配置 - 限制日志大小并启用日志轮转
logging:
driver: "json-file"
options:
max-size: "10m" # 单个日志文件最大10MB
max-file: "3" # 保留最多3个日志文件
compress: "true" # 压缩旧日志文件