services: gitea-codereview: build: context: . image: local/gitea-codereview:latest container_name: gitea-codereview restart: unless-stopped env_file: - .env environment: CR_HOST: 0.0.0.0 CR_PORT: 8090 CR_DATA_DIR: /data CR_GITEA_URL: ${CR_GITEA_URL:-http://192.168.31.51} CR_OCR_COMMAND: ocr TZ: Asia/Shanghai ports: - "${CR_HOST_PORT:-8090}:8090" volumes: - codereview-data:/data # Mount a custom OCR rule file here and set the path in the UI. # - ./rule.json:/etc/gitea-codereview/rule.json:ro healthcheck: test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:8090/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""] interval: 30s timeout: 10s retries: 3 start_period: 20s logging: driver: json-file options: max-size: "50m" max-file: "3" volumes: codereview-data: