You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
|
|
services:
|
|
# 前端服务
|
|
frontend:
|
|
image: daily-report-frontend:1.0.0 # 替换为你的前端 Docker 镜像
|
|
logging:
|
|
driver: "json-file" # 日志驱动,默认为 json-file
|
|
options:
|
|
max-size: "10m" # 单个日志文件的最大大小
|
|
max-file: "3" # 最多保留的日志文件数量
|
|
ports:
|
|
- "8086:80" # 映射前端服务端口
|
|
volumes:
|
|
- ../dist:/usr/share/nginx/html
|
|
- ../nginx.conf:/etc/nginx/nginx.conf
|
|
networks:
|
|
- app-network
|
|
|
|
# 后端服务
|
|
backend:
|
|
image: daily-report-api:1.0.0 # 替换为你的后端 Docker 镜像
|
|
logging:
|
|
driver: "json-file" # 日志驱动,默认为 json-file
|
|
options:
|
|
max-size: "10m" # 单个日志文件的最大大小
|
|
max-file: "3" # 最多保留的日志文件数量
|
|
ports:
|
|
- "5000:5000" # 映射后端服务端口
|
|
environment:
|
|
- LOG_DIR=/app/logs
|
|
- DATA_DIR=/app/temp_data
|
|
# 挂载卷
|
|
volumes:
|
|
# # 挂载日志目录
|
|
- $PWD:/app
|
|
depends_on:
|
|
- libreoffice
|
|
networks:
|
|
- app-network
|
|
|
|
# LibreOffice 服务
|
|
libreoffice:
|
|
image: linuxserver/libreoffice:latest # 替换为你的 LibreOffice Docker 镜像
|
|
logging:
|
|
driver: "json-file" # 日志驱动,默认为 json-file
|
|
options:
|
|
max-size: "10m" # 单个日志文件的最大大小
|
|
max-file: "3" # 最多保留的日志文件数量
|
|
volumes:
|
|
- $PWD:/app
|
|
ports:
|
|
- "8100:8100" # 暴露 LibreOffice 服务端口
|
|
networks:
|
|
- app-network
|
|
# 相同网络
|
|
networks:
|
|
app-network:
|
|
driver: bridge |