File size: 825 Bytes
96c4f85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
942ff10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
services:
  jimeng-api:
    # 使用 GHCR 上的镜像(生产环境)
    image: ghcr.io/iptag/jimeng-api:latest
    container_name: jimeng-api
    # 本地开发时可以取消注释下面的 build 配置
    # image: jimeng-api:latest
    # build:
    #   context: .
    #   dockerfile: Dockerfile
    restart: unless-stopped
    ports:
      - "5100:5100"
    #volumes:
    #  # 挂载日志目录(确保权限正确)
    #  - ./logs:/app/logs
    #  # 挂载临时目录
    #  - ./tmp:/app/tmp
    healthcheck:
      test: ["CMD", "wget", "-q", "--spider", "http://localhost:5100/ping"]
      interval: 15s
      timeout: 5s
      retries: 3
      start_period: 20s
    # 日志配置
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"