name: jiaowu

services:
  app:
    image: "${JIAOWU_IMAGE:-jiaowu:local}"
    build:
      context: .
      dockerfile: Dockerfile
    env_file:
      - .env
    ports:
      - "${JIAOWU_PORT:-8080}:8080"
    restart: unless-stopped
    init: true
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"
    volumes:
      - jiaowu-backups:/var/lib/jiaowu/backups

    # 如果 .env 中的 SslCa=/etc/jiaowu/mysql-ca.pem，请把 CA 放到
    # ./certs/mysql-ca.pem，并在上面的 volumes 中追加以下四行。
    #   - type: bind
    #     source: ./certs/mysql-ca.pem
    #     target: /etc/jiaowu/mysql-ca.pem
    #     read_only: true

volumes:
  jiaowu-backups:
