{
  "version": 5,
  "script": {
    "version": "0.1.0",
    "changeLog": "Auto-generated draft from TrueNAS gitea 1.6.36"
  },
  "requirements": {
    "locations": ["ApplicationsPerformance"],
    "specifications": ["2CORE"],
    "permissions": ["READ_WRITE_LOCATIONS"],
    "ports": [30008, 30009]
  },
  "ensure_directories_exists": [
    {"path": "$LOCATION(ApplicationsPerformance)"},
    {"path": "$LOCATION(ApplicationsPerformance)/gitea"},
    {
      "path": "$LOCATION(ApplicationsPerformance)/gitea/config",
      "owner": {"user": "apps"},
      "snapshot": {"id": "config"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/gitea/data",
      "owner": {"user": "apps"},
      "snapshot": {"id": "data"}
    },
    {
      "path": "$LOCATION(ApplicationsPerformance)/gitea/postgres_data",
      "owner": {"user": "netdata", "group": "docker"},
      "snapshot": {"id": "postgres_data"}
    }
  ],
  "app_values": {
    "gitea": {
      "db_password": "$RANDOM_STRING(16)",
      "root_url": "http://$SERVER_LAN_IP:30008"
    },
    "storage": {
      "config": "$HOST_PATH($LOCATION(ApplicationsPerformance)/gitea/config)",
      "data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/gitea/data)",
      "postgres_data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/gitea/postgres_data)"
    },
    "network": {
      "web_port": {"bind_mode": "published", "port_number": 30008},
      "ssh_port": {"bind_mode": "published", "port_number": 30009}
    },
    "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
  }
}
